Skip to content

Commit

Permalink
Merge pull request #31 from ekluzek/upnupopc
Browse files Browse the repository at this point in the history
Bring updates needed for NUOPC
  • Loading branch information
ekluzek authored Aug 6, 2020
2 parents 1fbd6fd + c032088 commit ec342bd
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 852 deletions.
2 changes: 2 additions & 0 deletions cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def _build_mosart():
paths = [ os.path.join(caseroot,"SourceMods","src.mosart"),
os.path.join(srcroot,"components","mosart","src","riverroute"),
os.path.join(srcroot,"components","mosart","src","cpl",driver)]
if driver == 'nuopc':
paths.append(os.path.join(srcroot,"cime","src","drivers","nuopc","nuopc_cap_share"))

with open(filepath_file, "w") as filepath:
filepath.write("\n".join(paths))
Expand Down
2 changes: 1 addition & 1 deletion cime_config/namelist_definition_mosart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<values>
<value rof_grid="r05" >$DIN_LOC_ROOT/rof/mosart/MOSART_routing_Global_0.5x0.5_c170601.nc</value>
<value rof_grid="r8th" >$DIN_LOC_ROOT/rof/mosart/MOSART_Global_8th_20191007.nc</value>
<value rof_grid="0.125nldas2">$DIN_LOC_ROOT/rof/mosart/MOSART_routing_0.125nldas2_c190415cdf5.nc</value>
<value rof_grid="0.125nldas2">$DIN_LOC_ROOT/rof/mosart/MOSART_routing_0.125nldas2_cdf5_c200727.nc</value>
</values>
<desc>
Full pathname of input datafile for RTM.
Expand Down
13 changes: 13 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
===============================================================
Tag name: mosart1_0_37
Originator(s): mvertens, erik, jedwards
Date: August 06, 2020
One-line Summary: Bring updates needed for NUOPC

Some more changes from @mvertens with updates for the NUOPC cap.
There's a new nuopc_cap_share directory added. SetVM is made public
in rof_comp_nuopc.F90 and some of the logging is slightly changed.
RtmIO is now using ROFID rather than instance name.

Also convert the nldas2 file into NetCDF5 format from Jim Edwards.

===============================================================
Tag name: mosart1_0_36
Originator(s): mvertens, sacks
Expand Down
15 changes: 8 additions & 7 deletions src/cpl/nuopc/rof_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module rof_comp_nuopc
use NUOPC , only : NUOPC_CompDerive, NUOPC_CompSetEntryPoint, NUOPC_CompSpecialize
use NUOPC , only : NUOPC_CompFilterPhaseMap, NUOPC_CompAttributeGet, NUOPC_CompAttributeSet
use NUOPC_Model , only : model_routine_SS => SetServices
use NUOPC_Model , only : SetVM
use NUOPC_Model , only : model_label_Advance => label_Advance
use NUOPC_Model , only : model_label_DataInitialize => label_DataInitialize
use NUOPC_Model , only : model_label_SetRunClock => label_SetRunClock
Expand All @@ -27,14 +28,15 @@ module rof_comp_nuopc
use perf_mod , only : t_startf, t_stopf, t_barrierf
use rof_import_export , only : advertise_fields, realize_fields
use rof_import_export , only : import_fields, export_fields
use rof_shr_methods , only : chkerr, state_setscalar, state_getscalar, state_diagnose, alarmInit
use rof_shr_methods , only : set_component_logging, get_component_instance, log_clock_advance
use nuopc_shr_methods , only : chkerr, state_setscalar, state_getscalar, state_diagnose, alarmInit
use nuopc_shr_methods , only : set_component_logging, get_component_instance, log_clock_advance

implicit none
private ! except

! Module routines
public :: SetServices
public :: SetVM
private :: InitializeP0
private :: InitializeAdvertise
private :: InitializeRealize
Expand Down Expand Up @@ -715,13 +717,12 @@ subroutine ModelAdvance(gcomp, rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=u_FILE_u)) return
end if

if (masterproc) then
call ESMF_ClockPrint(clock, options="currTime", preString="------>Advancing ROF from: ", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=u_FILE_u)) return
call ESMF_ClockPrint(clock, options="stopTime", preString="--------------------------------> to: ", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=u_FILE_u)) return
if (debug > 1) then
call log_clock_advance(clock, 'MOSART', iulog, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif


!--------------------------------
! Reset shr logging to my original values
!--------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/cpl/nuopc/rof_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module rof_import_export
use NUOPC_Model , only : NUOPC_ModelGet
use shr_kind_mod , only : r8 => shr_kind_r8
use shr_sys_mod , only : shr_sys_abort
use rof_shr_methods , only : chkerr
use nuopc_shr_methods , only : chkerr
use RunoffMod , only : rtmCTL, TRunoff
use RtmVar , only : iulog, nt_rtm, rtm_tracers
use RtmSpmd , only : masterproc
Expand Down
Loading

0 comments on commit ec342bd

Please sign in to comment.