Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Running CTSM5.1with surface data generated by mksurfdata_esmf

yifanc17

Yifan Cheng
New Member
Dear all,

I have encountered some issues when trying to run CTSM5.1.dev165 with the surface data generated by mksurfdata_esmf on Derecho.

Please correct me if I'm wrong, but I think because of some recent development/updates in CTSM5.2.mksurfdata (e.g., issues #1703, issues #1716), the surface data generated by mksurfdata_esmf introduces PCT_OCEAN instead of setting PCT_WETLAND to 100 at ocean points as in CTSM5.1, and it no longer has PFTDATA_MASK.

After checking the surfrdMod.F90, I realized that there are quite a number of major code changes regarding PCT_OCEAN and PFTDATA_MASK, leading to the incompatibility between the surfdace data and CTSM5.1. I switched to CTSM5.2.mksurfdata and the new surface data worked just fine. And CTSM5.1.dev165 worked perfectly fine with an older version of surface data made by mksurfdata_map (/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map/surfdata_0.125nldas2_hist_16pfts_Irrig_CMIP6_simyr2005_c190412.nc).

Does this mean that surface data generated by mksurfdata_esmf can only work using CTSM5.2.mksurfdata and current version of CTSM5.1 can only support surface data generated by mksurfdata_map? If that's the case, since mksurfdata_map is no longer supported on Derecho, any suggestions on how we can make our own surfdace data to run simulations using CTSM5.1? Or is there any other way to use CTSM5.1 with the surface data generated by mksurfdata_esmf?

I also tried to run mksurfdata_map on Casper, but gmake failed for several times even after rewinding to older versions of CTSM, here are what the error messages look like (not complete, but basically there are repeat errors like below in different src files):


ld: mkVICparamsMod.o: in function `mkvicparamsmod_mp_mkvicparams_':
/glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:117:(.text+0x75b): undefined reference to `nf_open_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:126:(.text+0x8ff): undefined reference to `nf_inq_varid_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:127:(.text+0x92c): undefined reference to `nf_get_var_double_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:141:(.text+0x9d8): undefined reference to `nf_inq_varid_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:142:(.text+0xa05): undefined reference to `nf_get_var_double_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:156:(.text+0xabd): undefined reference to `nf_inq_varid_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:157:(.text+0xaea): undefined reference to `nf_get_var_double_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:171:(.text+0xb9a): undefined reference to `nf_inq_varid_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:172:(.text+0xbc7): undefined reference to `nf_get_var_double_'
ld: /glade/work/yifanc17/code/ctsm5.1.dev090/tools/mksurfdata_map/src/mkVICparamsMod.F90:186:(.text+0xc69): undefined reference to `nf_close_'

gmake: *** [Makefile.common:355: ../mksurfdata_map] Error 1

Any suggestions would be greatly appreciated! Thanks for your time and help in advance!

Best,
Yifan
 

slevis

Moderator
Officially, what you wrote is correct: "surface data generated by mksurfdata_esmf can only work using CTSM5.2.mksurfdata and current version of CTSM5.1 can only support surface data generated by mksurfdata_map" as explained in this github issue:

As you point out, fsurdat files generated by ctsm5.2 could potentially work in ctsm5.1 after some debugging. This post has a link leading to some of the code modifications, but it does not address the presence of pct_ocean in the new files.
 

yifanc17

Yifan Cheng
New Member
Officially, what you wrote is correct: "surface data generated by mksurfdata_esmf can only work using CTSM5.2.mksurfdata and current version of CTSM5.1 can only support surface data generated by mksurfdata_map" as explained in this github issue:

As you point out, fsurdat files generated by ctsm5.2 could potentially work in ctsm5.1 after some debugging. This post has a link leading to some of the code modifications, but it does not address the presence of pct_ocean in the new files.
Thank you so much for replying! In addition to the post, Dr. Keith Oleson also pointed me to an issue where mksurfdata_map from older versions of CLM works on derecho: How do you get mksurfdata_map on older CLM versions to work on Derecho? · ESCOMP CTSM · Discussion #2388. Following the instructions, I've successfully made the 0.9x1.25 deg surface data using mksurfdata_map (with some additional path changes since the data in `/glade/p/` has been moved to `/glade/campaign/`).
 
Top