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 running an AMIP type simulation 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).

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!

Error:

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
(base) asiyab@derecho1:~/cesm2.2.0.geotrace/components/cam/tools/icesst/bcgen>
 

Asiya

Asiya1a2
New Member
Hi Again,

Update:
By adding -lnetcdff to the Makefiles, 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 the following error:

NetCDF: Variable not found

abort:

Does anyone here know what this error might be about? The SEAICE and SST variables are present in these files.
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
regrid was written to work with specific files and the script expect some variables with some names:
The expected format is:
/glade/campaign/cgd/cas/asphilli/cam_input_data/MODEL.ICE.HAD187001-198110.OI198111-202206.nc
/glade/campaign/cgd/cas/asphilli/cam_input_data/MODEL.SST.HAD187001-198110.OI198111-202206.nc

I just tried:
cd /glade/work/hannay/cesm_tags/cesm3_0_beta02/components/cam/tools/icesst/regrid
./regrid -i /glade/campaign/cgd/cas/asphilli/cam_input_data/MODEL.ICE.HAD187001-198110.OI198111-202206.nc \
-s /glade/campaign/cgd/cas/asphilli/cam_input_data/MODEL.SST.HAD187001-198110.OI198111-202206.nc \
-g /glade/u/home/hannay/sst/sstice_fv_0.9x1.25.nc \
-o /glade/derecho/scratch/hannay/sst/sstice_0.9x1.25.nc
and it worked.

Then I tried, and I get teh same error as you:
cd /glade/work/hannay/cesm_tags/cesm3_0_beta02/components/cam/tools/icesst/regrid
./regrid -i /glade/work/asiyab/grids_maps/MAPS/sstice.ice.nc -s /glade/work/asiyab/grids_maps/MAPS/sstice.ts.nc \
-g /glade/u/home/hannay/sst/sstice_fv_0.9x1.25.nc \
-o /glade/derecho/scratch/hannay/sst/sstice_0.9x1.25.nc

I briefly looked at your fiels and they don't have the variables date, datesec. I believe it might be teh issue.
 
Top