[gradsusr] Uncorrect time value in sdfwrite

Jennifer M Adams jadams21 at gmu.edu
Sun May 20 08:08:20 EDT 2018


Hi, Boyin — 
Your script sample is missing the ‘define sst=sst’ command, but I assume it is there in your actual script. 

As for the “time = 0 ; ” coordinate data value, here is the relevant Usage Note from the doc page on sdfwrite: 
"
By default, the output file will have a coordinate variable only for varying dimensions in the defined variable; non-varying dimensions will not appear as a coordinate variable with a size of 1. However, options have been added to the set sdfwrite command to force the variable in the output file to have at least 3, 4, or all 5 dimensions. When either of these options to set sdfwrite are used, the output file will retain information about the values of the dimensions that were fixed when the variable was defined; non-varying dimensions will appear as a coordinate variable of size 1. For example, if your defined variable is 500mb height on14may2002 (a 2D variable that varies only in lon and lat), and you use the -4d option, the output file with show height as a 4D variable with a Z dimension of size 1 called 'lev' with a value "500 mb", and a T dimension of size 1 called 'time' with a value of "0 minutes since 2002-05-14 00:00”.
“

Your output file has a T size of 1, but the coordinate value (increment from the origin) is 0 since the units give the valid time.
—Jennifer


> On May 20, 2018, at 5:41 AM, Andrew Friedman <andfried at gmail.com> wrote:
> 
> Hi Boyin,
> 
> To clarify: When you reopen sst.nc in GrADS, is the time value from ‘q dims’ correct, or is it also offset by 1?
> 
> -Andrew
> 
>> On May 18, 2018, at 8:12 PM, Boyin Huang - NOAA Federal <boyin.huang at noaa.gov> wrote:
>> 
>> Hi GrADS users,
>> 
>> I am writing NetCDF using the following
>> 'set t 1'
>> 'set x 1 180'
>> 'set y 1 89'
>> 'set z 1'
>> 'set sdfwrite -4d -flt -nc4 sst.nc'
>> 'sdfwrite sst'
>> 
>> Everything (including time attribute) looks fine except the value of time (in data section) is always 0 rather than 1:
>> " time = 0 ;"
>> 
>> Any suggestions in correcting the problem are appreciated.
>> 
>> Thanks a lot
>> 
>> -- 
>> Boyin Huang, Room-468
>> NOAA/NCEI/CCOG
>> Asheville, NC.
>> 828-271-4851
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://secure-web.cisco.com/1sOR2xhvzQh7j3xxBq5B6UiC0OD5WyQlo9IEaGEWfcG2hqvPeXQC4RmuBClIaKt0eJKQecZfV1xHN8KzWTiwkVBSa50UJvLZrsEURKdH0mFP-bztgPo5jq4GYFDnzZ1yKZSS64hKcue00Jq3exLWnri9KAwSuWnnWGhSDUl-3eXh8C1XvrZHQn2T-ZOixC1LXZix04BKr5KRjZssdze2dwR0aiZIgYpiG1oVpj5s8pUVJR5qJpU4MC1mEVeP73zRhXy-BT6dWD5sU8yGVx28GkMtn61ZZemJEa-KOLetkORgzZnDFcOwHraupHu0j5TX4Ze5fp6cztnzv1_h1xTSxE7YUcyrdOvA74DDhLaKieWoSxVUGsR3NP9yyqByai_zmUY_pzsTp05d0LxlzHhyjfYyUb6mM4_TwlXUdI2cda4hY8CkxirSCIRMnIZu9pgq0/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://secure-web.cisco.com/1sOR2xhvzQh7j3xxBq5B6UiC0OD5WyQlo9IEaGEWfcG2hqvPeXQC4RmuBClIaKt0eJKQecZfV1xHN8KzWTiwkVBSa50UJvLZrsEURKdH0mFP-bztgPo5jq4GYFDnzZ1yKZSS64hKcue00Jq3exLWnri9KAwSuWnnWGhSDUl-3eXh8C1XvrZHQn2T-ZOixC1LXZix04BKr5KRjZssdze2dwR0aiZIgYpiG1oVpj5s8pUVJR5qJpU4MC1mEVeP73zRhXy-BT6dWD5sU8yGVx28GkMtn61ZZemJEa-KOLetkORgzZnDFcOwHraupHu0j5TX4Ze5fp6cztnzv1_h1xTSxE7YUcyrdOvA74DDhLaKieWoSxVUGsR3NP9yyqByai_zmUY_pzsTp05d0LxlzHhyjfYyUb6mM4_TwlXUdI2cda4hY8CkxirSCIRMnIZu9pgq0/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University






More information about the gradsusr mailing list