Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
2a0da5f
Fixing the issue of conflicts between ESMF interfaces used for WRF an…
negin513 Dec 11, 2019
b519499
Compiling WRF with ESMF library. This compiled successfully and call …
negin513 Dec 11, 2019
e277eab
Add configure logic to set things needed by CTSM
billsacks Dec 13, 2019
b2fd67f
Expand WRF_CTSM_MKFILE in the include line
billsacks Dec 13, 2019
6bb9fdb
initialization works snapshot before restructuring everything
negin513 Dec 16, 2019
2107c14
wrf call for lilac initalization explicit in phys/module_physics_init.F
negin513 Dec 17, 2019
ae1ac53
Remove temporary call to ESMF_Initialize
billsacks Dec 24, 2019
83d660b
pushing the modifications in module_physics_init ...
negin513 Dec 24, 2019
a17cf4a
Merge branch 'configure_ctsm' into lilac_dev
billsacks Dec 24, 2019
5517bb5
Fixes to get LILAC initialization phase to work
billsacks Dec 25, 2019
02f8210
Create new module, module_sf_ctsm
billsacks Dec 31, 2019
4860ee7
Remove temporary print statements and commented-out code
billsacks Dec 31, 2019
2a9620d
Move lilac_reshape into module_sf_ctsm
billsacks Dec 31, 2019
56c08c9
Back out some incidental minor changes that Negin made
billsacks Dec 31, 2019
abca205
Move ctsm/lilac initialization into a new routine in module_sf_ctsm
billsacks Dec 31, 2019
03950ef
Fix use statements, minor cleanup
billsacks Dec 31, 2019
29a85a0
Minor cleanup, including using keyword-value args in lilac_init call
billsacks Dec 31, 2019
b95a3e9
LILAC expects timestep as an integer, not a real
billsacks Dec 31, 2019
8f16538
Use wrf_get_dm_communicator rather than mpi_comm_world
billsacks Dec 31, 2019
9dfa262
Avoid triggering an error for large dt values
billsacks Dec 31, 2019
01b3574
Add a TODO note
billsacks Dec 31, 2019
7a872c6
Get CTSM start and stop time from WRF namelist, rather than hard-coded
billsacks Dec 31, 2019
de5dc21
Tweak some comments
billsacks Dec 31, 2019
075b8cf
Add a new CTSMSCHEME option, and enclose ctsm calls in ifdefs
billsacks Dec 31, 2019
60526ff
Ignore incompatibility with wrfinput file when running with CTSM
billsacks Dec 31, 2019
c7b7b53
Add convert_1d_to_2d subroutine
billsacks Jan 1, 2020
4e9f24e
Add ctsm_run placeholder
billsacks Jan 1, 2020
00d18d8
Extract routine, get_num_points
billsacks Jan 1, 2020
89b28db
Add routine, export_to_lilac
billsacks Jan 1, 2020
dc4a16b
Add routine, import_from_lilac
billsacks Jan 1, 2020
9f9b564
Implement the first half of ctsm_run
billsacks Jan 1, 2020
bd61495
Fix compilation errors
billsacks Jan 2, 2020
872dad0
Fix typo
billsacks Jan 2, 2020
bb1fb56
Add outputs from CTSM to WRF
billsacks Jan 2, 2020
b4a9469
Fix array indexing
billsacks Jan 2, 2020
c721e3f
Add a comment and delete a comment
billsacks Jan 2, 2020
21c8a89
For now, return from ctsm_run without setting any lnd2atm fields
billsacks Jan 3, 2020
abc8323
In setting wrf -> lilac fields, only operate over its:ite, jts:jte
billsacks Jan 7, 2020
e4c87c2
Only set ctsm -> wrf output variables over land
billsacks Jan 7, 2020
82e84b1
Remove return after lilac_run
billsacks Jan 7, 2020
39e8224
Add a comment
billsacks Jan 7, 2020
72cdfa8
Set more output variables from ctsm->wrf
billsacks Jan 8, 2020
1d12ae5
Set t2 diagnostic output but not snow
billsacks Jan 8, 2020
0d980dc
Flip sign on ctsm->wrf heat and moisture fluxes
billsacks Jan 9, 2020
87d1092
Import roughness length from CTSM rather than using hard-coded values
billsacks Jan 28, 2020
76e63b2
LILAC now expects double-precision lons and lats
billsacks Jan 28, 2020
3a39f86
LILAC no longer expects stop time in initialization
billsacks Feb 1, 2020
83dbf7b
Remove some TODO notes
billsacks Feb 3, 2020
b9d2cb6
Pass landfrac to ctsm
billsacks Feb 5, 2020
8bfec7e
Fix argument names
billsacks Feb 5, 2020
55faee7
Update for reworked LILAC API
billsacks Mar 9, 2020
5e4a4e9
adding restart capability for WRF-CTSM simulations--tested -- BFB
negin513 Jul 7, 2020
64dbe99
Add some comments pointing to GitHub issues
billsacks Jul 13, 2020
002dfb7
zeroing out some negative fields sent from WRF to CTSM to avoid CTSM …
negin513 Jul 22, 2020
37f03e2
fixing the issue with present no_negative...
negin513 Jul 28, 2020
6a03812
passing th_phy to ctsm and setting forc_th as th_phy.
negin513 Jul 28, 2020
6aad25e
changing namelist option for ctsm sf_surface_physics==6
negin513 Jul 30, 2020
ef076e2
special handling of sea-ice points before and after ctsm_run.
negin513 Jul 30, 2020
a56705d
handling sea-ice identical to NOAH and NOAH-MP -- different from CLMS…
negin513 Jul 30, 2020
c8e5280
link to instructions for WRF-CTSM.
negin513 Aug 5, 2020
624864f
removing ctsmscheme test for NMM core
negin513 Aug 12, 2020
1bc9522
merging ctsm_coupling with wrf develop
negin513 Aug 14, 2020
2296313
fix for NMM test. ifdefs added around CTSMscheme variables
negin513 Aug 18, 2020
04d48b9
initial draft of README.CTSM
negin513 Aug 19, 2020
2244056
adding back -DWRF_USE_CLM flag which is not related to CTSM...
negin513 Aug 19, 2020
5d659f9
Remove CLM compilation flag from NEC and cygwin stanzas
davegill Aug 20, 2020
9f66327
Merge pull request #1 from davegill/ctsm_coupling_merged
negin513 Aug 20, 2020
9122a38
removing the extra line for README.md
negin513 Aug 25, 2020
af4ec63
removing the extra line for README.md
negin513 Aug 25, 2020
1166b40
fixing the typo in README.CTSM
negin513 Aug 25, 2020
adbc1e8
small changes and backing elseif for CTSM...
negin513 Aug 26, 2020
0b857f2
removing the un-necessary variable checks.
negin513 Aug 26, 2020
6fef565
adding sentences regarding CLM and CTSM cannot co-exist.
negin513 Aug 26, 2020
a29ee65
removing the redundant error checking.
negin513 Aug 26, 2020
67d3292
removing the redundant error check from module_physics_init.F
negin513 Aug 27, 2020
d601c28
fixing the typo
negin513 Aug 27, 2020
b2346f3
reverting phys/module_ra_cam.F back to 5a6e8613
negin513 Aug 28, 2020
a653550
updating the error msg for module_check_a_mundo.F
negin513 Aug 28, 2020
c807b55
cleaning up restart_flag and removing unused restart switch.
negin513 Aug 28, 2020
7c56a8c
Remove todo comments for things that have been done
billsacks Sep 2, 2020
94df804
addressing @davegill comments.
negin513 Sep 9, 2020
6f07ea8
removing the todo comment
negin513 Sep 9, 2020
74b81e2
Add restart_flag to AD solver, to pass to RK step 1
davegill Sep 13, 2020
513ae34
trigger jenkins
davegill Sep 19, 2020
3be8669
trigger jenkins
davegill Sep 21, 2020
c68a5bb
trigger jenkins
davegill Sep 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,7 @@ package lsmscheme sf_surface_physics==2 - state:flx4,fv
package ruclsmscheme sf_surface_physics==3 - state:smfr3d,keepfr3dflag,soilt1,rhosnf,snowfallac,precipfr,acrunoff
package noahmpscheme sf_surface_physics==4 - state:isnowxy,tvxy,tgxy,canliqxy,canicexy,eahxy,tahxy,cmxy,chxy,fwetxy,sneqvoxy,alboldxy,qsnowxy,wslakexy,zwtxy,waxy,wtxy,tsnoxy,zsnsoxy,snicexy,snliqxy,lfmassxy,rtmassxy,stmassxy,woodxy,stblcpxy,fastcpxy,xsaixy,taussxy,t2mvxy,t2mbxy,q2mvxy,q2mbxy,tradxy,neexy,gppxy,nppxy,fvegxy,qinxy,runsfxy,runsbxy,ecanxy,edirxy,etranxy,fsaxy,firaxy,aparxy,psnxy,savxy,sagxy,rssunxy,rsshaxy,bgapxy,wgapxy,tgvxy,tgbxy,chvxy,chbxy,shgxy,shcxy,shbxy,evgxy,evbxy,ghvxy,ghbxy,irgxy,ircxy,irbxy,trxy,evcxy,chleafxy,chucxy,chv2xy,chb2xy,chstarxy,smoiseq,smcwtdxy,rechxy,deeprechxy,fdepthxy,areaxy,rivercondxy,riverbedxy,eqzwt,pexpxy,qrfxy,qrfsxy,qspringxy,qspringsxy,qslatxy,stepwtd,rechclim,gddxy,grainxy,croptype,planting,harvest,season_gdd,cropcat,pgsxy,soilcomp,soilcl1,soilcl2,soilcl3,soilcl4
package clmscheme sf_surface_physics==5 - state:numc,nump,sabv,sabg,lwup,lhsoi,lhveg,lhtran,snl,snowdp,wtc,wtp,h2osno,t_grnd,t_veg,h2ocan,h2ocan_col,t2m_max,t2m_min,t2clm,t_ref2m,h2osoi_liq_s1,h2osoi_liq_s2,h2osoi_liq_s3,h2osoi_liq_s4,h2osoi_liq_s5,h2osoi_liq1,h2osoi_liq2,h2osoi_liq3,h2osoi_liq4,h2osoi_liq5,h2osoi_liq6,h2osoi_liq7,h2osoi_liq8,h2osoi_liq9,h2osoi_liq10,h2osoi_ice_s1,h2osoi_ice_s2,h2osoi_ice_s3,h2osoi_ice_s4,h2osoi_ice_s5,h2osoi_ice1,h2osoi_ice2,h2osoi_ice3,h2osoi_ice4,h2osoi_ice5,h2osoi_ice6,h2osoi_ice7,h2osoi_ice8,h2osoi_ice9,h2osoi_ice10,t_soisno_s1,t_soisno_s2,t_soisno_s3,t_soisno_s4,t_soisno_s5,t_soisno1,t_soisno2,t_soisno3,t_soisno4,t_soisno5,t_soisno6,t_soisno7,t_soisno8,t_soisno9,t_soisno10,dzsnow1,dzsnow2,dzsnow3,dzsnow4,dzsnow5,snowrds1,snowrds2,snowrds3,snowrds4,snowrds5,t_lake1,t_lake2,t_lake3,t_lake4,t_lake5,t_lake6,t_lake7,t_lake8,t_lake9,t_lake10,h2osoi_vol1,h2osoi_vol2,h2osoi_vol3,h2osoi_vol4,h2osoi_vol5,h2osoi_vol6,h2osoi_vol7,h2osoi_vol8,h2osoi_vol9,h2osoi_vol10,albedosubgrid,lhsubgrid,hfxsubgrid,lwupsubgrid,q2subgrid,sabvsubgrid,sabgsubgrid,nrasubgrid,swupsubgrid
package ctsmscheme sf_surface_physics==6 - -
package pxlsmscheme sf_surface_physics==7 - state:t2_ndg_new,q2_ndg_new,t2_ndg_old,q2_ndg_old,t2obs,q2obs,vegf_px,imperv,canfra,lai_px,wwlt_px,wfc_px,wsat_px,clay_px,csand_px,fmsand_px
package ssibscheme sf_surface_physics==8 - state:ssib_fm,ssib_fh,ssib_cm,ssibxdd,ssib_br,ssib_lhf,ssib_shf,ssib_ghf,ssib_egs,ssib_eci,ssib_ect,ssib_egi,ssib_egt,ssib_sdn,ssib_sup,ssib_ldn,ssib_lup,ssib_wat,ssib_shc,ssib_shg,ssib_lai,ssib_vcf,ssib_z00,ssib_veg,isnow,swe,snowden,snowdepth,tkair,dzo1,wo1,tssn1,tssno1,bwo1,bto1,cto1,fio1,flo1,bio1,blo1,ho1,dzo2,wo2,tssn2,tssno2,bwo2,bto2,cto2,fio2,flo2,bio2,blo2,ho2,dzo3,wo3,tssn3,tssno3,bwo3,bto3,cto3,fio3,flo3,bio3,blo3,ho3,dzo4,wo4,tssn4,tssno4,bwo4,bto4,cto4,fio4,flo4,bio4,blo4,ho4

Expand Down
34 changes: 34 additions & 0 deletions arch/Config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
$sw_jasperinc_path="";
$sw_esmflib_path="";
$sw_esmfinc_path="";
$sw_ctsm_mkfile_path="";
$sw_ldflags="";
$sw_compileflags="";
$sw_opt_level="";
Expand Down Expand Up @@ -321,6 +322,20 @@
$sw_esmf_ldflag = "yes" ;
}

# A separately-installed CTSM library and its dependencies are required
# to build WRF with the CTSM land surface model (the next generation of
# the CLM model, coupled via LILAC). The user must set the environment
# variable WRF_CTSM_MKFILE, which should be a path to a make-formatted
# file containing settings of CTSM_INCLUDES and CTSM_LIBS. When this
# environment variable is set, this also triggers adding -DWRF_USE_CTSM;
# when this env var is not set, then we instead use -DWRF_USE_CLM, which
# builds an old version of CLM that is included in the WRF source code.
# (We currently cannot build with both at once because of namespace
# collisions at link time.)
if ( $ENV{WRF_CTSM_MKFILE} ) {
$sw_ctsm_mkfile_path = $ENV{WRF_CTSM_MKFILE};
}

# parse the configure.wrf file

$validresponse = 0 ;
Expand Down Expand Up @@ -584,6 +599,19 @@
$_ =~ s:ESMFIOEXTLIB:-L\$\(WRF_SRC_ROOT_DIR\)/external/esmf_time_f90 -lesmf_time:g ;
}
}

# CTSM substitutions in configure.defaults and postamble
if ( $sw_ctsm_mkfile_path ) {
$_ =~ s:CONFIGURE_D_CTSM:-DWRF_USE_CTSM:g ;
$_ =~ s:CONFIGURE_CTSM_INC:\$\(CTSM_INCLUDES\):g ;
$_ =~ s:CONFIGURE_CTSM_LIB:\$\(CTSM_LIBS\):g ;
}
else {
$_ =~ s:CONFIGURE_D_CTSM:-DWRF_USE_CLM:g ;
$_ =~ s:CONFIGURE_CTSM_INC::g ;
$_ =~ s:CONFIGURE_CTSM_LIB::g ;
}

if ( $ENV{HWRF} )
{
$_ =~ s:CONFIGURE_ATMOCN_LIB:-L\$\(WRF_SRC_ROOT_DIR\)/external/atm_ocn -latm_ocn:g ;
Expand Down Expand Up @@ -779,6 +807,12 @@
$_ =~ s:ESMFIODEFS::g ;
$_ =~ s:ESMFTARGET:esmf_time:g ;
}

# CTSM substitutions in preamble
if ( $sw_ctsm_mkfile_path ) {
$_ =~ s:\# CTSMINCLUDEGOESHERE:include $sw_ctsm_mkfile_path: ;
}

if ( $ENV{HWRF} )
{
$_ =~ s:CONFIGURE_ATMOCN_LIB:-L\$\(WRF_SRC_ROOT_DIR\)/external/atm_ocn -latm_ocn:g ;
Expand Down
Loading