Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Orientation for files .nc

30 views
Skip to first unread message

Aaron Sancho

unread,
Jan 26, 2017, 9:22:00 PM1/26/17
to pitlakq-users
Dear Mike 

I need your help, because I`m trying to read  the file with NC format which is easy in the consola anaconda pront with the command ncdump,However I need to work in another format and to understand the data in a better way. I have investigated a lot  how to export these data to another format however I haven`t had a positive answer so I hope your answer, please.

Regards
Aaron Sancho 
  

Dr. Mike Mueller

unread,
Jan 30, 2017, 4:56:04 AM1/30/17
to pitlak...@googlegroups.com
Dear Aaron,

The orientation is either west-east if `swapped_x_y` is False or
north-south `swapped_x_y` is True: in the file
models/<model_name>/input/preprocessing.yaml

bathymetry:
initial_water_surface:
value: 185
max_water_surface:
value: 200
orientations:
value: [1.57]
swapped_x_y:
value: False

The corresponding orientations are 1.57 (0.5 * pi) for west-east
or 4.71 (1.5 * pi) for north-south. (See the W2 manual for more details
on orientation.)

The default is False, i.e. west-east and 1.57.

ncdump should show all needed information.

The output file models/<model_name>/output/w2/bath.nc
contains all output:

ncdump -h out.nc
netcdf out {
dimensions:
scalar = 1 ;
time_step_size = 7 ;
time = UNLIMITED ; // (3649 currently)
ncp = 64 ;
nbp = 1 ;
w2z = 52 ;
w2x = 10 ;
variables:
int timesteps(time, time_step_size) ;
double volpr(time, nbp) ;
double cl(time, w2z, w2x) ;
double quh2_cum_minus(time, w2z, nbp) ;
double quh1_cum_minus(time, w2z, nbp) ;
double na(time, w2z, w2x) ;
double quh1_cum_plus(time, w2z, nbp) ;
double qdh1_cum_minus(time, w2z, nbp) ;
double iceth(time, w2x) ;
double quh2_cum_plus(time, w2z, nbp) ;
double qdh2_cum_minus(time, w2z, nbp) ;
double qdh1_cum_plus(time, w2z, nbp) ;
double elws(time, w2x) ;
double hactive(time, w2z, w2x) ;
double rho(time, w2z, w2x) ;
double tds(time, w2z, w2x) ;
double vactive(time, w2z, w2x) ;
double voltbr(time, nbp) ;
double t2(time, w2z, w2x) ;
double t1(time, w2z, w2x) ;
double qdh2_cum_plus(time, w2z, nbp) ;
double balance_error(time, w2z, w2x) ;
double zu(w2z) ;
double deltax(w2x) ;


The file models/<model_name>/input/w2/bath.nc
contains the geometry information:

ncdump -c bath.nc

netcdf bath {
dimensions:
segment_lenght = 10 ;
layer_height = 52 ;
variables:
double segment_lenght(segment_lenght) ;
double starting_water_level(segment_lenght) ;
double segment_orientation(segment_lenght) ;
double layer_height(layer_height) ;
double cell_width(layer_height, segment_lenght) ;
data:

segment_lenght = 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ;

layer_height = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1 ;
}


The file:

/models/<model_name>/preprocessing/input/reservoir.txt

contains the geometry information you supplied:

Columns RW
1 100
2 200
3 300
4 400
5 500
6 600
7 700
8 800
9 900
Layers ZU
1 150
2 151
3 152
4 153
5 154
...
49 198
50 199
51 200

This should be enough to read the data and move them into a different format.

Let me know if it works.

We also offer consulting. So if you need somebody to write a on convert for
you, just let me know.

Best,
Mike



Am 27.01.17 um 03:22 schrieb Aaron Sancho:
> --
> You received this message because you are subscribed to the Google Groups
> "pitlakq-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pitlakq-user...@googlegroups.com
> <mailto:pitlakq-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Dr. Mike Mueller

unread,
Jan 30, 2017, 5:33:31 AM1/30/17
to pitlak...@googlegroups.com
Correcting myself.

Replace north-south with south-north.

But if does not matter to much for open lakes (as opposed to rivers).

Mike

Am 30.01.17 um 10:55 schrieb Dr. Mike Mueller:
Reply all
Reply to author
Forward
0 new messages