Skip to content

Commit

Permalink
Merge pull request #268 from mvertens/feature/add_dglc
Browse files Browse the repository at this point in the history
Add a dglc component with noevolve mode
  • Loading branch information
jedwards4b authored Apr 1, 2024
2 parents 9b92a2b + 6891809 commit df7ccea
Show file tree
Hide file tree
Showing 36 changed files with 1,837 additions and 185 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ endif()
target_include_directories(dshr PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/streams>
$<INSTALL_INTERFACE:mod>)

foreach(COMP datm dice dlnd docn drof dwav)
foreach(COMP datm dice dglc dlnd docn drof dwav)
add_subdirectory("${COMP}")
if(BLD_STANDALONE)
target_include_directories(${COMP} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/share>
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def buildlib(bldroot, libroot, case):
expect(False, nextline)

# Link the CDEPS component directories to the location expected by cime
for comp in ("atm", "lnd", "ice", "ocn", "rof", "wav"):
for comp in ("atm", "glc", "lnd", "ice", "ocn", "rof", "wav"):
compname = case.get_value("COMP_{}".format(comp.upper()))
comppath = os.path.join(case.get_value("EXEROOT"), comp, "obj")
if compname == "d" + comp:
Expand Down
150 changes: 0 additions & 150 deletions cime_config/testdefs/testlist_cdeps.xml

This file was deleted.

4 changes: 2 additions & 2 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module cdeps_datm_comp
use shr_const_mod , only : shr_const_cday
use shr_sys_mod , only : shr_sys_abort
use shr_cal_mod , only : shr_cal_ymd2date
use shr_log_mod , only : shr_log_setLogUnit
use shr_log_mod , only : shr_log_setLogUnit
use dshr_methods_mod , only : dshr_state_diagnose, chkerr, memcheck
use dshr_strdata_mod , only : shr_strdata_type, shr_strdata_init_from_config, shr_strdata_advance
use dshr_strdata_mod , only : shr_strdata_get_stream_pointer, shr_strdata_setOrbs
Expand Down Expand Up @@ -264,7 +264,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)

! Obtain flds_scalar values, mpi values, multi-instance values and
! set logunit and set shr logging to my log file
call dshr_init(gcomp, 'ATM', sdat, mpicom, my_task, inst_index, inst_suffix, &
call dshr_init(gcomp, 'ATM', mpicom, my_task, inst_index, inst_suffix, &
flds_scalar_name, flds_scalar_num, flds_scalar_index_nx, flds_scalar_index_ny, &
logunit, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down
23 changes: 14 additions & 9 deletions datm/cime_config/testdefs/testlist_datm.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>
<testlist version="2.0">

<test compset="2000_DATM%QIA_SLND_DICE%SSMI_DOCN%DOM_SROF_SGLC_SWAV" grid="T42_T42" name="SMS_Ln9_P1" testmods="datm/scam">
<test compset="2000_DATM%QIA_SLND_SICE_DOCN%DOM_SROF_SGLC_SWAV" grid="T42_T42" name="SMS_Ln9_P1" testmods="datm/scam">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
</test>
<test compset="2000_DATM%QIA_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -17,6 +19,7 @@
<test compset="2000_DATM%CRUv7_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -25,6 +28,7 @@
<test compset="HIST_DATM%GSWP3v1_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -33,6 +37,7 @@
<test compset="1850_DATM%GSWP3v1_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -41,6 +46,7 @@
<test compset="2010_DATM%GSWP3v1_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -49,6 +55,7 @@
<test compset="SSP585_DATM%GSWP3v1_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -57,6 +64,7 @@
<test compset="2000_DATM%NLDAS2_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="f10_f10_mg37" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -65,6 +73,7 @@
<test compset="2000_DATM%NYF_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="T62_g17" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -73,6 +82,7 @@
<test compset="2000_DATM%IAF_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="T62_g17" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -81,6 +91,7 @@
<test compset="2000_DATM%JRA_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="TL319_t061" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -89,6 +100,7 @@
<test compset="2000_DATM%JRA-1p4-2018_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="TL319_t061" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand All @@ -97,14 +109,7 @@
<test compset="2000_DATM%1PT_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="1x1_mexicocityMEX" name="SMS_Ld5_P1" testmods="datm/1PT">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
</options>
</test>
<test compset="2000_DATM%ERA5_SLND_SICE_SOCN_SROF_SGLC_SWAV_SESP" grid="TL319_t061" name="SMS_Ld5">
<machines>
<machine name="derecho" compiler="intel" category="aux_cdeps"/>
<machine name="betzy" compiler="intel" category="aux_cdeps_noresm"/>
</machines>
<options>
<option name="wallclock"> 00:10:00 </option>
Expand Down
12 changes: 12 additions & 0 deletions datm/datm_datamode_core2_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module datm_datamode_core2_mod
! export state pointers
real(r8), pointer :: Sa_u(:) => null()
real(r8), pointer :: Sa_v(:) => null()
real(r8), pointer :: Sa_u10m(:) => null()
real(r8), pointer :: Sa_v10m(:) => null()
real(r8), pointer :: Sa_z(:) => null()
real(r8), pointer :: Sa_tbot(:) => null()
real(r8), pointer :: Sa_ptem(:) => null()
Expand Down Expand Up @@ -115,6 +117,8 @@ subroutine datm_datamode_core2_advertise(exportState, fldsexport, flds_scalar_na
call dshr_fldList_add(fldsExport, 'Sa_z' )
call dshr_fldList_add(fldsExport, 'Sa_u' )
call dshr_fldList_add(fldsExport, 'Sa_v' )
call dshr_fldList_add(fldsExport, 'Sa_u10m' )
call dshr_fldList_add(fldsExport, 'Sa_v10m' )
call dshr_fldList_add(fldsExport, 'Sa_ptem' )
call dshr_fldList_add(fldsExport, 'Sa_dens' )
call dshr_fldList_add(fldsExport, 'Sa_pslv' )
Expand Down Expand Up @@ -219,6 +223,10 @@ subroutine datm_datamode_core2_init_pointers(exportState, sdat, datamode, factor
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_v' , fldptr1=Sa_v , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_u10m' , fldptr1=Sa_u10m , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_v10m' , fldptr1=Sa_v10m , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_tbot' , fldptr1=Sa_tbot , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_pbot' , fldptr1=Sa_pbot , rc=rc)
Expand Down Expand Up @@ -315,6 +323,10 @@ subroutine datm_datamode_core2_advance(datamode, target_ymd, target_tod, target_
Sa_u(n) = uprime*cos(winddFactor(n)*degtorad) - vprime*sin(winddFactor(n)*degtorad)
Sa_v(n) = uprime*sin(winddFactor(n)*degtorad) + vprime*cos(winddFactor(n)*degtorad)

! Set Sa_u10m and Sa_v10m to Sa_u and Sa_v
Sa_u10m(n) = Sa_u(n)
Sa_v10m(n) = Sa_v(n)

!--- density and pslv taken directly from input stream, set pbot ---
Sa_pbot(n) = Sa_pslv(n)

Expand Down
18 changes: 18 additions & 0 deletions datm/datm_datamode_jra_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ module datm_datamode_jra_mod

! export state pointers
real(r8), pointer :: Sa_z(:) => null()
real(r8), pointer :: Sa_u(:) => null()
real(r8), pointer :: Sa_v(:) => null()
real(r8), pointer :: Sa_u10m(:) => null()
real(r8), pointer :: Sa_v10m(:) => null()
real(r8), pointer :: Sa_tbot(:) => null()
real(r8), pointer :: Sa_ptem(:) => null()
real(r8), pointer :: Sa_shum(:) => null()
Expand Down Expand Up @@ -88,6 +92,8 @@ subroutine datm_datamode_jra_advertise(exportState, fldsexport, flds_scalar_name
call dshr_fldList_add(fldsExport, 'Sa_z' )
call dshr_fldList_add(fldsExport, 'Sa_u' )
call dshr_fldList_add(fldsExport, 'Sa_v' )
call dshr_fldList_add(fldsExport, 'Sa_u10m' )
call dshr_fldList_add(fldsExport, 'Sa_v10m' )
call dshr_fldList_add(fldsExport, 'Sa_ptem' )
call dshr_fldList_add(fldsExport, 'Sa_dens' )
call dshr_fldList_add(fldsExport, 'Sa_pslv' )
Expand Down Expand Up @@ -174,6 +180,14 @@ subroutine datm_datamode_jra_init_pointers(exportState, sdat, rc)
call shr_strdata_get_stream_pointer( sdat, 'Faxa_swdn' , strm_swdn , rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call dshr_state_getfldptr(exportState, 'Sa_u' , fldptr1=Sa_u , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_v' , fldptr1=Sa_v , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_u10m' , fldptr1=Sa_u10m , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_v10m' , fldptr1=Sa_v10m , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_z' , fldptr1=Sa_z , rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_state_getfldptr(exportState, 'Sa_tbot' , fldptr1=Sa_tbot , rc=rc)
Expand Down Expand Up @@ -253,6 +267,10 @@ subroutine datm_datamode_jra_advance(exportstate, target_ymd, target_tod, model_
Sa_pbot(n) = Sa_pslv(n)
Sa_ptem(n) = Sa_tbot(n)

! Set Sa_u10m and Sa_v10m to Sa_u and Sa_v
Sa_u10m(n) = Sa_u(n)
Sa_v10m(n) = Sa_v(n)

! density computation for JRA55 forcing
Sa_dens(n) = Sa_pbot(n)/(rdair*Sa_tbot(n)*(1 + 0.608*Sa_shum(n)))

Expand Down
Loading

0 comments on commit df7ccea

Please sign in to comment.