MITgcm / gcmfaces

gcmfaces is a Matlab / Octave toolbox that handles gridded earth variables in generic fashion. Read more at:
http://gcmfaces.readthedocs.io/en/latest/
MIT License
24 stars 21 forks source link

need to support nctiles variant used in ECCO v4 r4 #9

Open gaelforget opened 5 years ago

gaelforget commented 5 years ago

For ECCO v4 r4, a slightly different version of nctiles was used, which is not yet supported by gcmfaces read_nctiles.m.

New format looks like this:

    float UVELMASS(time, k, tile, j, i_g) ;
        UVELMASS:units = "m/s" ;
        UVELMASS:long_name = "X-Comp of Geometry-Weighted Velocity (m/s)" ;
        UVELMASS:coordinates = "timestep Z" ;

@owang1 , do you think that read_nctiles.m could easily be modified to support both the newer and older nctiles files?

gaelforget commented 4 years ago

Hi @owang1

Thanks for https://github.com/gaelforget/gcmfaces/pull/10 which I just merged.

When I tried the now-merged version with v4r4 output (3 years of oceQnet) I got an error.

Maybe something like the patch below is needed?

@@ -193,11 +193,12 @@
   else;
     t0 = 1;
     t1 = lff;
+    nt=t1-t0+1;
   end;
   for fft=t0:t1;

     %read one tile
-    fileIn=flist{fft+1};
+    fileIn=flist{fft};

(But maybe I am missing something obvious)

gaelforget commented 4 years ago

Hi @owang01

Could you please confirm that we are all set with changes needed to handled the latest ECCOv4r4 output from https://ecco.jpl.nasa.gov/drive/files/Version4/Release4/ ?

Specifically can you please make sure that :

All of the above need to be true for ECCO users' experience to be smooth when they go back and forth between ECCOv4r2 to ECCOv4r4 imho. We know that at least one user has already experienced disruptions to their workflow in relation to the format change ( see http://mailman.mit.edu/pipermail/ecco-support/2020-May/000415.html ). What I am particularly concerned with are users that might not report their frustration and instead just switch to using something else than ECCO I guess.

gaelforget commented 4 years ago

Just found these other posts in one of the ECCO repos which seem related

gaelforget commented 4 years ago

Hi @hongandyan

Thanks for your post @ http://mailman.mit.edu/pipermail/ecco-support/2020-May/000424.html which included this suggestion for modifying gcmfaces :

"read_nctiles.m" needs two minor fixes
1) https://github.com/MITgcm/gcmfaces/blob/master/gcmfaces_IO/read_nctiles.m#L64
basedir = './'; ==> basedir = '.';
2) https://github.com/MITgcm/gcmfaces/blob/master/gcmfaces_IO/read_nctiles.m#L190
    t0=tt(1)-1; ==>     t0=tt(1);

While I dont have a sense whether that's the right approach, and might not have time to think about this more in the near future, I repost your suggestion from the other public forum to this thread so we dont lose track of your suggestion.

owang01 commented 4 years ago

Just copy the post about the updated read_nctiles.m @ https://github.com/ECCO-GROUP/ECCO-v4-Configurations/issues/48. The updated read_nctiles.m should perform similarly when reading either V4r3 or V4r4 files.