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

icesst tool

Asiya

Asiya1a2
New Member
We are doing an AMIP type run using mid-Holocene SST and sea ice lower boundary conditions in CAM6 (/glade/work/marcusl/CESM_model_versions/cesm2.2.0.geotrace). We want to create an SST/sea ice file for this time period using the following datasets:
SST data: /glade/collections/cdg/data/CMIP6/PMIP/NCAR/CESM2/midHolocene/r1i1p1f1/Amon/ts/gn/latest/ts_Amon_CESM2_midHolocene_r1i1p1f1_gn_050101-055012.nc
Sea ice data: /glade/u/home/marcusl/timeseries-cmip6/b.e21.B1850.f09_g17.PMIP4-midHolo.001/atm/proc/tseries/month_1/b.e21.B1850.f09_g17.PMIP4-midHolo.001.cam.h0.ICEFRAC.050101-055012.nc

I understand that I need to use the seaice tool in CAM to create the SST file for the mid-Holocene. However, I am encountering errors with the Makefiles in the bcgen and regrid components of the icesst tool (/glade/u/home/asiyab/cesm2.2.0.geotrace/components/cam/tools/icesst).

Error:

base) asiyab@derecho1:~/cesm2.2.0.geotrace/components/cam/tools/icesst/bcgen> make -f Makefile
ifort -c -I/usr/local/include -O prec.f90
ifort -c -I/usr/local/include -O solver.f90
ifort -c -I/usr/local/include -O calcclim.f90
ifort -c -I/usr/local/include -O calcfull.f90
ifort -c -I/usr/local/include -O driver.f90
ifort -c -I/usr/local/include -O types.f90
ifort -c -I/usr/local/include -O bcgen.f90
ifort -c -I/usr/local/include -O output_dateinfo.f90
ifort -c -I/usr/local/include -O setup_outfile.f90
ifort -c -I/usr/local/include -O wrap_nf.f90
ifort -o bcgen calcclim.o calcfull.o driver.o bcgen.o output_dateinfo.o prec.o setup_outfile.o solver.o wrap_nf.o types.o -L/usr/local/lib -lnetcdf
ld: driver.o: in function `MAIN__':
driver.f90:(.text+0x1d76): undefined reference to `nf_get_att_text_'
ld: setup_outfile.o: in function `setup_outfile_':
setup_outfile.f90:(.text+0x92f): undefined reference to `nf_enddef_'
ld: wrap_nf.o: in function `wrap_nf_create_':
wrap_nf.f90:(.text+0x14): undefined reference to `nf_create_'
ld: wrap_nf.f90:(.text+0xad): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_open_':
wrap_nf.f90:(.text+0x124): undefined reference to `nf_open_'
ld: wrap_nf.f90:(.text+0x1bd): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_put_att_text_':
wrap_nf.f90:(.text+0x276): undefined reference to `nf_put_att_text_'
ld: wrap_nf.f90:(.text+0x374): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_def_dim_':
wrap_nf.f90:(.text+0x3fc): undefined reference to `nf_def_dim_'
ld: wrap_nf.f90:(.text+0x4c5): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_inq_dimid_':
wrap_nf.f90:(.text+0x537): undefined reference to `nf_inq_dimid_'
ld: wrap_nf.f90:(.text+0x5e5): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_inq_dimlen_':
wrap_nf.f90:(.text+0x653): undefined reference to `nf_inq_dimlen_'
ld: wrap_nf.f90:(.text+0x702): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_inq_varid_':
wrap_nf.f90:(.text+0x777): undefined reference to `nf_inq_varid_'
ld: wrap_nf.f90:(.text+0x825): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_def_var_':
wrap_nf.f90:(.text+0x8b0): undefined reference to `nf_def_var_'
ld: wrap_nf.f90:(.text+0x994): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_get_vara_int_':
wrap_nf.f90:(.text+0x9fe): undefined reference to `nf_get_vara_int_'
ld: wrap_nf.f90:(.text+0xa8e): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_get_var_int_':
wrap_nf.f90:(.text+0xaee): undefined reference to `nf_get_var_int_'
ld: wrap_nf.f90:(.text+0xb7e): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_get_vara_double_':
wrap_nf.f90:(.text+0xbde): undefined reference to `nf_get_vara_double_'
ld: wrap_nf.f90:(.text+0xc6e): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_get_var_double_':
wrap_nf.f90:(.text+0xcce): undefined reference to `nf_get_var_double_'
ld: wrap_nf.f90:(.text+0xd5e): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_close_':
wrap_nf.f90:(.text+0xdbf): undefined reference to `nf_close_'
ld: wrap_nf.f90:(.text+0xe50): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_put_var_int_':
wrap_nf.f90:(.text+0xeba): undefined reference to `nf_put_var_int_'
ld: wrap_nf.f90:(.text+0xee5): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_put_vara_int_':
wrap_nf.f90:(.text+0xf4a): undefined reference to `nf_put_vara_int_'
ld: wrap_nf.f90:(.text+0xf75): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_put_var_double_':
wrap_nf.f90:(.text+0xfda): undefined reference to `nf_put_var_double_'
ld: wrap_nf.f90:(.text+0x1005): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `wrap_nf_put_vara_double_':
wrap_nf.f90:(.text+0x106a): undefined reference to `nf_put_vara_double_'
ld: wrap_nf.f90:(.text+0x1095): undefined reference to `nf_strerror_'
ld: wrap_nf.o: in function `handle_error_':
wrap_nf.f90:(.text+0x1106): undefined reference to `nf_strerror_'
make: *** [Makefile:77: bcgen] Error 1


I read here (AMIP HadISST boundary conditions issue) that I may need to edit the Makefiles and preprocess my input datasets to use the icesst tool effectively. However, I am unsure about what specific edits to make in the Makefiles. I would greatly appreciate any guidance or directions on how to proceed. Thank you!
 

sacks

Bill Sacks
CSEG and Liaisons
Staff member
I don't have experience with these tools... I can help you with this initial question but if you have deeper questions on the use of these tools I'll probably have to move this to the CAM forums for further assistance.

First, make sure you have a netcdf module loaded. You can check this with "module list". For example, I see "netcdf/4.9.2" when I run "module list". If you don't see a netcdf given, you'll need to do "module load netcdf".

After that, I was able to get this build to work by making the following changes: In the Makefile in both subdirectories (bcgen and regrid), change the LDFLAGS line (line 15): after "-lnetcdf" add " -lnetcdff". (This is needed to pick up the Fortran-specific netcdf libraries.)
 
Vote Upvote 0 Downvote

Asiya

Asiya1a2
New Member
Thank you so much for your reply! By adding -lnetcdff, I was also able to get the build to work!

Following the instructions in the README file for the icesst tool (~/cesm2.2.0.geotrace/components/cam/tools/icesst), I tried to regrid my input files using the following command:

./regrid -i /glade/work/asiyab/grids_maps/MAPS/sstice.ice.nc -s /glade/work/asiyab/grids_maps/MAPS/sstice.ts.nc -g /glade/p/cesmdata/inputdata/atm/cam/sst/sst_HadOIBl_bc_1x1_1850_2017_c180507.nc -o ~/VR_codes/sstice0.nc

However, I am receiving this short error:

NetCDF: Variable not found

abort:

Do you happen to know what this error is about?
 
Vote Upvote 0 Downvote
Top