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

Reading SST (.nc) file inside the fortran file sst_data.F90 for specifing user defined SST

Hi I am running aquaplanet configeration in CESM CAM5 and want to specify warm pool throgh the a .nc file inside the code (models/atm/cam/src/utils/cam_dom/sst_data.F90 file) . I have created a nc file for the warm pool specifing the SST and is facing problem in reading it inside the sst_data.F90 file. Can any one guide me how to  make my .nc file get read read in the CAM model. Thanks in advance. RegardsKamal
 

islas

Moderator
Staff member
Hi Kamal,I'm not sure if this helps you with your problem, but there's an example here where a netcdf file is created using NCL and then read in to the model  http://www.cesm.ucar.edu/models/simpler-models/trefread.html.  It's not for SST, it's for a 3D field, but perhaps it can be adapted for your needs and you could search for other places in the code where a 2D field is being read in with similar commands? Isla
 
Dear mam  Thanks for your reply. I am trying to read the prescribes SST for aquaplanet configuration of CAM in the file ocn_comp.F90 but there analytical SST has been prescribed. I am facing issues on how to read my user-defined SST.nc file inside this module. Thanks and regardsKamal
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
Your SST should be in the same format than the regular SST. It should have the variables.

int date(time) ;
date:long_name = "current date (YYYYMMDD)" ;

int datesec(time) ;
datesec:long_name = "current seconds of current date" ;

double lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;

double lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;

double time(time) ;
time:units = "days since 1850-01-01 00:00:00" ;
time:calendar = "365_day" ;

float ice_cov(time, lat, lon) ;
ice_cov:long_name = "BCS Pseudo Sea-ice concentration" ;
ice_cov:units = "fraction" ;

float SST_cpl(time, lat, lon) ;
SST_cpl:long_name = "BCS Pseudo SST" ;
SST_cpl:units = "deg_C" ;



The easiest way is to look at a SST file and try to mimic it
 
Top