Re: Using my own oceanographic netcdf files

207 views
Skip to first unread message

Christina Hernandez

unread,
Mar 22, 2018, 10:18:28 AM3/22/18
to connectivity-modeling-system-club
File attachment was too big, so here's a Google Drive link for the netcdf file: ​

Christina Hernandez
Graduate Student
MIT-WHOI Joint Program in Oceanography
Biology Dept- Llopiz Lab
MS #33

On Thu, Mar 22, 2018 at 10:15 AM, Christina Hernandez <cmh...@columbia.edu> wrote:
Hi all,


However, I am having issues with using getdata to read in my own netcdf files. These files are from a theoretical model that is basically simulating flow in a rectangular channel with eddies arising due to wind forcing and instabilities at a front. Our project is hoping to look at dispersal kernels at several levels of abstraction (with the most realistic instance being a ROMS model being developed for our study region, along the coast of Central Chile), so I'd like to use CMS for all the runs.

I'm using an older version of CMS, downloaded in 2013. I don't know if any of the code dealing with using non-HYCOM files have been edited since then. 

Anyway, I'm attaching my nest_1.nml file and the first oceanographic file. Can anyone tell me if getdata will run for them on this or if they spy a mistake? I wrote this nest file myself (in R) using hydrodynamic output that a collaborator gave me, and I've checked the names of the variables several times. I still get the error:
fortran runtime error: Cannot match namelist object name "lon"

Thanks!
Chrissy

Christina Hernandez
Graduate Student
MIT-WHOI Joint Program in Oceanography
Biology Dept- Llopiz Lab
MS #33

nest_1.nml

Robin F

unread,
Mar 22, 2018, 10:40:54 AM3/22/18
to Christina Hernandez, connectivity-modeling-system-club
Hi Christina,

You don’t need to use getdata when dealing with your own nc files.

Instead, format the nest files in the exact same way as in the cms example (order of dimensions, direction of the dimensions, etc), create a folder "/expt/expt_myexptname/nests" and put them in the folder.

You may also have to split your nest files into (1) nest_1_20000410000000u.nc and (2) nest_1_20000410000000v.nc, with a single u or v component in each u or v nest files.

It is a bit more complicated than using standard HYCOMS or ROMS data but it does work ;)
If you have more questions I can try to help you, I have done it in the past with my own files.

Good luck,

> Le 22 mars 2018 à 10:18, Christina Hernandez <cmh...@columbia.edu> a écrit :
>
> File attachment was too big, so here's a Google Drive link for the netcdf file: ​
> --
> You received this message because you are subscribed to the Google Groups "connectivity-modeling-system-club" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to connectivity-modeling-...@googlegroups.com.
> To post to this group, send email to connectivity-mod...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--

Dr. Robin Faillettaz
——————————————————————

Postdoctoral Research Fellow
University of Miami
Rosenstiel School of Marine & Atmospheric Science
4600 Rickenbacker Causeway, Miami, FL 33149-1098, USA
Tel: (US) +1-702-910-0380; (FR) +33-6-84-91-43-33
Robin.Fa...@gmail.com
Robin.Fa...@univ-lille1.fr


Christina Hernandez

unread,
Apr 16, 2018, 12:07:56 PM4/16/18
to Robin F, connectivity-modeling-system-club
Sorry, attachments didn't work. They are here:

Christina Hernandez
Graduate Student
MIT-WHOI Joint Program in Oceanography
Biology Dept- Llopiz Lab
MS #33

On Mon, Apr 16, 2018 at 11:59 AM, Christina Hernandez <cmh...@columbia.edu> wrote:
Hey Robin,

So I have tried a few times now to get CMS to run with idealized model output. Attached is one of the hydrodynamic files, and the nest_1.nml file.
When I run CMS with the file as attached, with [u, v, w] all in one file, it says "NETCDF variable not found" but it doesn't tell me which variable is not found. When I run CMS with [u, v, w] in separate files with u/v/w/ appended to the filename, it says that it can't find the nest_1_20000605000000.nc file. 

Do you have any other tips? 

Thanks,
Chrissy


Christina Hernandez
Graduate Student
MIT-WHOI Joint Program in Oceanography
Biology Dept- Llopiz Lab
MS #33

> To unsubscribe from this group and stop receiving emails from it, send an email to connectivity-modeling-system-club+unsubscribe@googlegroups.com.
> To post to this group, send email to connectivity-modeling-system-cl...@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>

--

Dr. Robin Faillettaz
——————————————————————

Postdoctoral Research Fellow
University of Miami
Rosenstiel School of Marine & Atmospheric Science
4600 Rickenbacker Causeway, Miami, FL 33149-1098, USA
Tel: (US) +1-702-910-0380; (FR) +33-6-84-91-43-33
Robin.Fa...@gmail.com

Juan Faundez

unread,
Jun 26, 2018, 10:32:09 AM6/26/18
to connectivity-modeling-system-club
Dear All,

I have my own oceanographic data from CROCO (ROMS-AGRIF). Such as Christina i couldnt match my variable names into my data.nc with the nest_1.nml when I runned ./cms my_data. I runned the example downloaded by getdata getting results, but if I change the dimension or variable names between " " in the input_example/nest_1.nml, anyway cms run.

Then i changed in my own data the variable and dimension names to the same which produced getdata, "Longitude", "Latitude", "Depth" ,"Time", transforming my C-grid to an A-grid and from sigma to z-level (Sorry, but the last two processes i did before change the dimension and variable names, for the first test). Also I'm using Time as the record dimension (UNLIMITED). Then from a "NETCDF variable not found" I passed to a "Error in the netCDF file: expt_mpa/nests/nest_1_20101201000000.nc / NetCDF: Start+count exceeds dimension bound". What i figure out is that the first trouble was due to the wrong dimension names (now solved) and the second one perhaps depend of the dimension order in each variable, where I changed  variable("Time","Depth","Latitude","Longitude" ) by variable("Longitude", "Latitude", "Depth" ,"Time"). This last step also didn't work and i got the same last error

I attached my own data (https://drive.google.com/open?id=1Rf6MHM-A2qcPhpTaxxek_mB6e4NeMPPD)  and my nest_1.nml. Maybe my trouble come from other places which i cant see yet. I will be very glad if somebody can help me.

Thank you

DATA FROM MATLAB SHOW DIMENSIONS AND SIZES WITH 31 SNAPSHOT
Format:
           classic
Dimensions:
           Longitude = 155
           Latitude  = 172
           Depth     = 40
           Time      = 31    (UNLIMITED)
Variables:
    Longitude
           Size:       155x1
           Dimensions: Longitude
           Datatype:   double
           Attributes:
                       long_name   = 'Longitude'
                       units       = 'degrees_east'
                       valid_range = [-82.9167     -70.0833]
    Latitude 
           Size:       172x1
           Dimensions: Latitude
           Datatype:   double
           Attributes:
                       long_name   = 'Latitude'
                       units       = 'degrees_north'
                       valid_range = [-38.9352      -27.026]
    Time     
           Size:       31x1
           Dimensions: Time
           Datatype:   double
           Attributes:
                       long_name = 'Time'
                       units     = 'seconds since 2002-1-17'
    Depth    
           Size:       40x1
           Dimensions: Depth
           Datatype:   double
           Attributes:
                       long_name   = 'Depth'
                       units       = 'meter'
                       valid_range = [0  2000]
    zu       
           Size:       155x172x40x31
           Dimensions: Longitude,Latitude,Depth,Time
           Datatype:   double
           Attributes:
                       long_name   = 'zu'
                       units       = 'm/s'
                       _FillValue  = 1.2676506e+30
                       valid_range = [-0.51724     0.38312]
    zv       
           Size:       155x172x40x31
           Dimensions: Longitude,Latitude,Depth,Time
           Datatype:   double
           Attributes:
                       long_name   = 'zv'
                       units       = 'm/s'
                       _FillValue  = 1.2676506e+30
                       valid_range = [-0.31513     0.64925]
    zw       
           Size:       155x172x40x31
           Dimensions: Longitude,Latitude,Depth,Time
           Datatype:   double
           Attributes:
                       long_name   = 'zw'
                       units       = 'm/s'
                       _FillValue  = 1.2676506e+30
                       valid_range = [-0.00054219  0.00072905]

##########################################################################################

NCDUMP -H SHOWING THE DIMENSION POSITION INSIDE THE VARIABLE WITH 1 SNAPSHOT
dimensions:
        Depth = 40 ;
        Latitude = 172 ;
        Longitude = 155 ;
        Time = UNLIMITED ; // (1 currently)
variables:
        double Depth(Depth) ;
                Depth:long_name = "Depth" ;
                Depth:units = "meter" ;
                Depth:valid_range = 0., 2000. ;
        double Latitude(Latitude) ;
                Latitude:long_name = "Latitude" ;
                Latitude:units = "degrees_north" ;
                Latitude:valid_range = -38.9352378845215, -27.0260391235352 ;
        double Longitude(Longitude) ;
                Longitude:long_name = "Longitude" ;
                Longitude:units = "degrees_east" ;
                Longitude:valid_range = -82.9166641235352, -70.0833358764648 ;
        double Time(Time) ;
                Time:long_name = "Time" ;
                Time:units = "seconds since 2002-1-17" ;
        double zu(Time, Depth, Latitude, Longitude) ;
                zu:long_name = "zu" ;
                zu:units = "m/s" ;
                zu:_FillValue = 1.2676506e+30 ;
                zu:valid_range = -0.517239212989807, 0.383117631077766 ;
        double zv(Time, Depth, Latitude, Longitude) ;
                zv:long_name = "zv" ;
                zv:units = "m/s" ;
                zv:_FillValue = 1.2676506e+30 ;
                zv:valid_range = -0.315126286007926, 0.64925342798233 ;
        double zw(Time, Depth, Latitude, Longitude) ;
                zw:long_name = "zw" ;
                zw:units = "m/s" ;
                zw:_FillValue = 1.2676506e+30 ;
                zw:valid_range = -0.000542192161233348, 0.000729051047234748 ;

// global attributes:
                :history = "Tue Jun 26 10:14:20 2018: ncks -d Time,0,0 nest_1_20101201000000_mpa.nc nest_1_20101201000000.nc" ;
                :NCO = "4.6.8" ;

#################################################################
TEST WITH GETDATA JUST TO READ FILE.NC
./getdata mpa 1
 fill_value and velocity_conversion_factor on read   1.26765060E+30   1.00000000
 Opening file for reading: expt_mpa/nests/raw/nest_1_20101201000000.nc
 Succesfully read data: Longitude
 Succesfully read data: Latitude
 Succesfully read data: Depth
 Starting X Axis index:            1
 Ending X Axis index  :          155
 Starting Y Axis index:          172
 Ending Y Axis index  :            1
 Starting Z Axis index:            1
 Ending Z Axis index  :           40
Reading data files: 2010-12-1 00:00:00
 Error in the netCDF file: expt_mpa/nests/raw/nest_1_20101201000000.nc
 NetCDF: Start+count exceeds dimension bound
root@DESKTOP-8RKHT2D:/mnt/c/Users/juanf/Documents/cms/cms-master/expt# ./cms mpa 1
 Error in the netCDF file: expt_mpa/nests/nest_1_20101201000000.nc
 NetCDF: Start+count exceeds dimension bound
nest_1.nml

Ignasi Vallès Casanova

unread,
Jan 10, 2020, 11:56:17 AM1/10/20
to connectivity-modeling-system-club
any solution about that? I'm having similar problem

El dimarts, 26 juny de 2018 16:32:09 UTC+2, Juan Faundez va escriure:

Robin F

unread,
Jan 10, 2020, 1:44:31 PM1/10/20
to Ignasi Vallès Casanova, connectivity-modeling-system-club
Briefly, one work around for the 'variable not found’ error that works most of the time is to run a getdata on your local files. You just have to place them in nests/raw and run ./getdata exptname

The issues 'Start+count exceeds dimension bound' has to be with your file, likely with the dimensions or values you provided when preparing your files.

Good luck.


> Le 10 janv. 2020 à 11:56, Ignasi Vallès Casanova <ignasi...@gmail.com> a écrit :
>
> any solution about that? I'm having similar problem

--

Robin Faillettaz, Ph.D
——————————————————————

Postdoctoral Research Fellow
RECOVER2 project
University of Miami
Rosenstiel School of Marine & Atmospheric Science
4600 Rickenbacker Causeway, Miami, FL 33149-1098, USA
Tel: (US) +1-702-910-0380; (FR) +33-6-84-91-43-33
Robin.Fa...@gmail.com
Robin.Fa...@rsmas.miami.edu


Reply all
Reply to author
Forward
0 new messages