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

Plumber 2: missing surfdata files. How to create them?

ijaguirre

Ignacio Aguirre
New Member
Hi,

I'm attempting to run the Plumber 2 sites using CLM 5.3 (the latest version) using the ./run_tower capabilities. However, some towers (listed below) are missing the surfdata files, and therefore, their simulations cannot be conducted.

The stations missing surfdata files are:
  • BE-Lon
  • ES-ES2
  • IE-Ca1
  • IT-BCi
  • IT-CA2
  • DE-Geb
  • US-Ne1
  • DE-Kli
  • US-Ne1
  • US-Ne2
  • US-Ne3
  • DE-Seh
  • DK-Ris
  • US-Twt
  • US-ARM
  • US-Bo1
By default, these files are being searched in /glade/campaign/cesm/cesmdata/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/ctsm5.3.0/. Unfortunately, there are no files associated with these stations in that folder.

In this context, I am wondering: (a) Do you have the surfdata files associated with these stations?

If not, (b) I noticed that these files are available for ctsm5.2 (/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/). Is there a way to automatically update them from version 5.2 to 5.3? I received a warning that the files are different, given the CLM version.

If not, (c) How can I create these files in a way that is consistent with the other stations? I noticed the existence of a script (CTSM/python/ctsm/subset_data.py at master · ESCOMP/CTSM), and I am wondering if you have any documentation on how the previous surfdata files were created to ensure consistency in the creation of the missing ones.

I tried to use the script, but it failed because the sample longitude value I entered was of the class Longitude, not a float. See below.

Code:
(ctsm_pylib) iaguirre@derecho7:~/glade_work/clm_version/develop_15062025/CTSM/python/ctsm> python subset_data.py point --create-surface --lat -33 --lon -70
WARNING: No dominant pft type is chosen. If you want to choose a dominant pft type, please use --dompft flag.
Traceback (most recent call last):
  File "subset_data.py", line 893, in <module>
    main()
  File "subset_data.py", line 888, in main
    subset_point(args, file_dict)
  File "subset_data.py", line 730, in subset_point
    specify_fsurf_out=file_dict["fsurf_out"],
  File "/glade/u/home/iaguirre/glade_work/clm_version/develop_15062025/CTSM/python/ctsm/site_and_regional/single_point_case.py", line 502, in create_surfdata_at_point
    f_tmp = f_in.sel(lsmlon=self.plon, lsmlat=self.plat, method="nearest")
  File "/glade/work/iaguirre/conda-envs/ctsm_pylib/lib/python3.7/site-packages/xarray/core/dataset.py", line 2231, in sel
    self, indexers=indexers, method=method, tolerance=tolerance
  File "/glade/work/iaguirre/conda-envs/ctsm_pylib/lib/python3.7/site-packages/xarray/core/coordinates.py", line 417, in remap_label_indexers
    obj, v_indexers, method=method, tolerance=tolerance
  File "/glade/work/iaguirre/conda-envs/ctsm_pylib/lib/python3.7/site-packages/xarray/core/indexing.py", line 269, in remap_label_indexers
    label = maybe_cast_to_coords_dtype(label, coords_dtype)
  File "/glade/work/iaguirre/conda-envs/ctsm_pylib/lib/python3.7/site-packages/xarray/core/utils.py", line 77, in maybe_cast_to_coords_dtype
    label = np.asarray(label, dtype=coords_dtype)
  File "/glade/work/iaguirre/conda-envs/ctsm_pylib/lib/python3.7/site-packages/numpy/core/_asarray.py", line 83, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number, not 'Longitude'


Thank you very much in advance,



What version of the code are you using?
ctsm5.3.057
 

slevis

Moderator
Staff member
The default search seems wrong, because the files are here:
/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2
 

ijaguirre

Ignacio Aguirre
New Member
Hi

Thank you for the reply. I attempted to run CLM5.3 with the file from the aforementioned folder; however, I received a warning indicating a mismatch between the version associated with the file (CLM 5.2) and the version of my simulation (CLM 5.3). See below.

Code:
 Opened existing file
 /glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/su
 rfdata_1x1_PLUMBER2_BE-Lon_hist_2000_16pfts_c240326.nc         150
 Input surface dataset is:
 /glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/su
 rfdata_1x1_PLUMBER2_BE-Lon_hist_2000_16pfts_c240326.nc
This surface dataset is older and incompatible with this version of CTSM
Dataset version = 5.2 Version expected = 5.3
 ERROR in surfrdMod.F90 at line 183                                             
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                      
 ENDRUN:
 ERROR: Incompatible surface dataset

There is another folder,/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/ctsm5.3.0; however, many stations (e.g., BE-Lon) are missing from this folder.

In this regard,
(a) Do you have the surfdata files associated with these stations?
(b) Is there a way to automatically update them from version 5.2 to 5.3?
(c) How can I create these files in a way that is consistent with the other stations?

Thank you in advance,
 

slevis

Moderator
Staff member
My mistake. So this directory
/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2
contains the 5.2 files
and this directory
/glade/campaign/cesm/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf/PLUMBER2/ctsm5.3.0
contains the 5.3 files.

- I do not know why the 5.3 list does not include the same sites as 5.2.
- I am not aware of an automated way of updating files from 5.2 to 5.3.
- You could compare 5.3 versus 5.2 files for sites that have both. Then try to manually implement the same changes to the 5.2 files that you want to convert.
 
Top