force file

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
pooran
Posts: 72
Joined: Fri Jan 31, 2014 5:54 pm
Location: Khoramshahr Marine Science and Technology Universi

force file

#1 Unread post by pooran »

dear
after doing

Code: Select all

 cdo selvar
command to change lon and lat's names in Dimensions 's part to x and y, force file's header change to:

Code: Select all

ncdisp('shflux.nc')
Source:
           /home/forcing/shflux.nc
Format:
           64bit
Global Attributes:
           CDI         = 'Climate Data Interface version 1.5.9 (http://code.zmaw.de/projects/cdi)'
           Conventions = 'CF-1.4'
           history     = 'Sun Jul 20 16:51:29 2014: cdo selvar shflux1_era.nc shflux.nc
                         Forcing file created with /home/forcing/d_ecmwf2roms.m on Sunday - July 20, 2014 - 4:24:11.3743 PM'
           type        = 'FORCING file'
           title       = 'ECMWF ERA-Interim Dataset, Gulf of Mexico Region'
           CDO         = 'Climate Data Operators version 1.5.9 (http://code.zmaw.de/projects/cdo)'
Dimensions:
           x        = 73
           y        = 94
           shf_time = 2920  (UNLIMITED)
Variables:
    lon     
           Size:       73x94
           Dimensions: x,y
           Datatype:   double
           Attributes:
                       standard_name       = 'longitude'
                       long_name           = 'longitude'
                       units               = 'degree_east'
                       _CoordinateAxisType = 'Lon'
    lat     
           Size:       73x94
           Dimensions: x,y
           Datatype:   double
           Attributes:
                       standard_name       = 'latitude'
                       long_name           = 'latitude'
                       units               = 'degree_north'
                       _CoordinateAxisType = 'Lat'
    shf_time
           Size:       2920x1
           Dimensions: shf_time
           Datatype:   double
           Attributes:
                       standard_name = 'time'
                       long_name     = 'surface net heat flux time'
                       units         = 'days since 2005-01-01 00:00:00'
                       calendar      = 'standard'
    shflux  
           Size:       73x94x2920
           Dimensions: x,y,shf_time
           Datatype:   single
           Attributes:
                       long_name      = 'surface net heat flux'
                       units          = 'Watt meter-2'
                       coordinates    = 'lon lat'
                       positive_value = 'downward flux, heating'
                       negative_value = 'upward flux, cooling'
                       time           = 'shf_time'
as you can sea it does not have

Code: Select all

spherical
           Size:       1x1
           Dimensions: 
           Datatype:   int32
           Attributes:
                       long_name     = 'grid type logical switch'
                       flag_values   = [0.00e+00 1.00e+00]
                       flag_meanings = 'Cartesian spherical'
as a variable. also its calender change from gregorian to standart and some other changes
would you please that it will make problem? in the other hand my force file in this shape is correct or not?
cheers

fot origin file:

Code: Select all

ncdisp('shflux1.nc')
Format:
           64bit
Global Attributes:
           type    = 'FORCING file'
           title   = 'ECMWF ERA-Interim Dataset, Gulf of Mexico Region'
           history = 'Forcing file created with /home/forcing/d_ecmwf2roms.m on Sunday - July 20, 2014 - 4:24:11.3743 PM'
Dimensions:
           lon      = 73
           lat      = 94
           shf_time = 2920  (UNLIMITED)
Variables:
    spherical
           Size:       1x1
           Dimensions: 
           Datatype:   int32
           Attributes:
                       long_name     = 'grid type logical switch'
                       flag_values   = [0.00e+00 1.00e+00]
                       flag_meanings = 'Cartesian spherical'
    lon      
           Size:       73x94
           Dimensions: lon,lat
           Datatype:   double
           Attributes:
                       long_name     = 'longitude'
                       units         = 'degree_east'
                       standard_name = 'longitude'
    lat      
           Size:       73x94
           Dimensions: lon,lat
           Datatype:   double
           Attributes:
                       long_name     = 'latitude'
                       units         = 'degree_north'
                       standard_name = 'latitude'
    shf_time 
           Size:       2920x1
           Dimensions: shf_time
           Datatype:   double
           Attributes:
                       long_name = 'surface net heat flux time'
                       units     = 'days since 2005-01-01 00:00:00'
                       calendar  = 'gregorian'
    shflux   
           Size:       73x94x2920
           Dimensions: lon,lat,shf_time
           Datatype:   single
           Attributes:
                       long_name      = 'surface net heat flux'
                       units          = 'Watt meter-2'
                       positive_value = 'downward flux, heating'
                       negative_value = 'upward flux, cooling'
                       time           = 'shf_time'
                       coordinates    = 'lon lat shf_time '

pooran
Posts: 72
Joined: Fri Jan 31, 2014 5:54 pm
Location: Khoramshahr Marine Science and Technology Universi

Re: force file

#2 Unread post by pooran »

dear friends
sorry to repeat my question but because i am a newbie with what ROMS need, i am worried that changed force file with mentioned header (in above post) have been damaged (after doing CDO command) and changed to incomplete format.
Would you please guide me that its new header is complete and correct or not?
Many thanks for any reply
cheers
pooran

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: force file

#3 Unread post by kate »

I'm not familiar with the cdo command nor do I know what you hoped it would do. For ROMS, only the grid file needs the spherical flag (or not) to specify that we're dealing with a lat,lon grid (or an x,y grid). The real test is in how ROMS reads in the file - or fails to read it. Have you tried either the before or after file? What happens during the ROMS read?

pooran
Posts: 72
Joined: Fri Jan 31, 2014 5:54 pm
Location: Khoramshahr Marine Science and Technology Universi

Re: force file

#4 Unread post by pooran »

Before applying CDO command on force file, when i run model it gives following error:
NETCDF_INQ_VAR - requested variable: lat sms_time
not found in input file: /home/forcing/CS_sms_era.nc
call from: get_varcoords.F

after doing CDO command on force file, roms was able to read force file (which created by d_ecmwf2roms.m)

what about coordinates and time flags of shflux? They change form
 

Code: Select all

time           = 'shf_time'
coordinates    = 'lon lat shf_time 
to

Code: Select all

coordinates = 'lon lat'
time           = 'shf_time'
and also calendar changed from Gregorian to standard
I would be appreciate that if these changes make problem please tell it to me.
Also if you have another recommend for solving that error please guide me.

cheers

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: force file

#5 Unread post by kate »

The coordinates should be "lon lat". You might be able to change the original Matlab script to fix that. ROMS will ignore the calendar. It sounds like you found a working solution, so don't worry about it.

Post Reply