[WAM-IPE] WAM-IPE r93833: Fix module_MEDIATOR_SpaceWeather.F90 to handle sli...
Samuel.Trahan at noaa.gov
Samuel.Trahan at noaa.gov
Fri Jun 16 16:56:03 UTC 2017
Friendly WAM-IPE developers,
This is an automated email about a WAM-IPE commit.
Project: WAM-IPE
URL: https://svnemc.ncep.noaa.gov/projects/nems/branches/WAM-IPE/quasitrunk
Revision: 93833
Author: robert.oehmke at noaa.gov
Date: 2017-06-05T17:20:14.818832Z
Message:
Fix module_MEDIATOR_SpaceWeather.F90 to handle slightly negative densities.
Differences:
Index: checkout/src/module_MEDIATOR_SpaceWeather.F90
===================================================================
--- checkout/src/module_MEDIATOR_SpaceWeather.F90 (revision 93163)
+++ checkout/src/module_MEDIATOR_SpaceWeather.F90 (revision 93833)
@@ -1363,6 +1363,19 @@
end subroutine InitGrids
+! Log function which handles negative numbers
+function log_hneg(in)
+ real(ESMF_KIND_R8) :: in, log_hneg
+ real(ESMF_KIND_R8), parameter :: log_min=1.0E-10
+
+ if (in >= log_min) then
+ log_hneg=log(in)
+ else
+ log_hneg=log(log_min)
+ endif
+end function log_hneg
+
+
! Run Routine
subroutine RunRegrid(model, importState, exportState, rc)
type(ESMF_GridComp) :: model
@@ -1614,11 +1627,10 @@
exit
endif
if (kk>1) then
- wamdata(i,k-startlevel+1)=exp((log(varbuf(i,kk))*(wamhgt(k)-hgtbuf(i,kk-1))+ &
- log(varbuf(i,kk-1))*(hgtbuf(i,kk)-wamhgt(k)))/ &
+ wamdata(i,k-startlevel+1)=exp((log_hneg(varbuf(i,kk))*(wamhgt(k)-hgtbuf(i,kk-1))+ &
+ log_hneg(varbuf(i,kk-1))*(hgtbuf(i,kk)-wamhgt(k)))/ &
(hgtbuf(i,kk)-hgtbuf(i,kk-1)))
else
-
wamdata(i,k-startlevel+1)=varbuf(i,kk)
endif
enddo
Index: checkout/src
===================================================================
--- checkout/src (revision 93163)
+++ checkout/src (revision 93833)
Property changes on: checkout/src
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
Merged /nems/branches/WAM-IPE/bob_dev/src:r92999-93826
Index: checkout
===================================================================
--- checkout (revision 93163)
+++ checkout (revision 93833)
Property changes on: checkout
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,2 ##
Merged /nems/branches/WAM-IPE/quasitrunk:r92674-92998
Merged /nems/branches/WAM-IPE/bob_dev:r92999-93826
-------------- next part --------------
Index: checkout/src/module_MEDIATOR_SpaceWeather.F90
===================================================================
--- checkout/src/module_MEDIATOR_SpaceWeather.F90 (revision 93163)
+++ checkout/src/module_MEDIATOR_SpaceWeather.F90 (revision 93833)
@@ -1363,6 +1363,19 @@
end subroutine InitGrids
+! Log function which handles negative numbers
+function log_hneg(in)
+ real(ESMF_KIND_R8) :: in, log_hneg
+ real(ESMF_KIND_R8), parameter :: log_min=1.0E-10
+
+ if (in >= log_min) then
+ log_hneg=log(in)
+ else
+ log_hneg=log(log_min)
+ endif
+end function log_hneg
+
+
! Run Routine
subroutine RunRegrid(model, importState, exportState, rc)
type(ESMF_GridComp) :: model
@@ -1614,11 +1627,10 @@
exit
endif
if (kk>1) then
- wamdata(i,k-startlevel+1)=exp((log(varbuf(i,kk))*(wamhgt(k)-hgtbuf(i,kk-1))+ &
- log(varbuf(i,kk-1))*(hgtbuf(i,kk)-wamhgt(k)))/ &
+ wamdata(i,k-startlevel+1)=exp((log_hneg(varbuf(i,kk))*(wamhgt(k)-hgtbuf(i,kk-1))+ &
+ log_hneg(varbuf(i,kk-1))*(hgtbuf(i,kk)-wamhgt(k)))/ &
(hgtbuf(i,kk)-hgtbuf(i,kk-1)))
else
-
wamdata(i,k-startlevel+1)=varbuf(i,kk)
endif
enddo
Index: checkout/src
===================================================================
--- checkout/src (revision 93163)
+++ checkout/src (revision 93833)
Property changes on: checkout/src
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
Merged /nems/branches/WAM-IPE/bob_dev/src:r92999-93826
Index: checkout
===================================================================
--- checkout (revision 93163)
+++ checkout (revision 93833)
Property changes on: checkout
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,2 ##
Merged /nems/branches/WAM-IPE/quasitrunk:r92674-92998
Merged /nems/branches/WAM-IPE/bob_dev:r92999-93826
More information about the WAM-IPE
mailing list