Changeset 4455


Ignore:
Timestamp:
Mar 11, 2020 12:20:29 PM (4 years ago)
Author:
Giersch
Message:

Axis attribute added to netcdf output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r4400 r4455  
    2525! -----------------
    2626! $Id$
     27! Axis attribute added to netcdf output
     28!
     29! 4400 2020-02-10 20:32:41Z suehring
    2730! Move routine to transform coordinates from netcdf_interface_mod to
    2831! basic_constants_and_equations_mod
     
    736739                                     '1', 'grid point above terrain',          &
    737740                                     471, 472, 000 )
     741             CALL netcdf_create_att( id_set_mask(mid,av),                      &
     742                                     id_var_zu_mask(mid,av), 'axis', 'Z', 000)
     743                                     
    738744             CALL netcdf_create_dim( id_set_mask(mid,av), 'kw_above_surf',     &
    739745                                     mask_size(mid,3), id_dim_zw_mask(mid,av), &
     
    745751                                    '1', 'grid point above terrain',           &
    746752                                    474, 475, 000 )
     753             CALL netcdf_create_att( id_set_mask(mid,av),                      &
     754                                     id_var_zw_mask(mid,av), 'axis', 'Z', 000)
    747755          ELSE
    748756!
     
    755763                                     NF90_DOUBLE, id_var_zu_mask(mid,av),      &
    756764                                     'meters', '', 471, 472, 000 )
     765             CALL netcdf_create_att( id_set_mask(mid,av),                      &
     766                                     id_var_zu_mask(mid,av), 'axis', 'Z', 000)
    757767!
    758768!--          Define vertical coordinate grid (zw grid)
     
    764774                                     NF90_DOUBLE, id_var_zw_mask(mid,av),      &
    765775                                    'meters', '', 474, 475, 000 )
     776             CALL netcdf_create_att( id_set_mask(mid,av),                      &
     777                                     id_var_zw_mask(mid,av), 'axis', 'Z', 000)
    766778          ENDIF
    767779!
     
    773785                                  NF90_DOUBLE, id_var_x_mask(mid,av),          &
    774786                                  'meters', '', 477, 478, 000 )
     787          CALL netcdf_create_att( id_set_mask(mid,av), id_var_x_mask(mid,av),  &
     788                                  'axis', 'X', 000)
    775789!
    776790!--       Define x-axis (for u position)
     
    781795                                  NF90_DOUBLE, id_var_xu_mask(mid,av),         &
    782796                                  'meters', '', 480, 481, 000 )
     797          CALL netcdf_create_att( id_set_mask(mid,av), id_var_xu_mask(mid,av), &
     798                                  'axis', 'X', 000)
    783799!
    784800!--       Define y-axis (for scalar position)
     
    789805                                  NF90_DOUBLE, id_var_y_mask(mid,av),          &
    790806                                  'meters', '', 483, 484, 000 )
     807          CALL netcdf_create_att( id_set_mask(mid,av), id_var_y_mask(mid,av),  &
     808                                  'axis', 'Y', 000)
    791809!
    792810!--       Define y-axis (for v position)
     
    797815                                  'yv', NF90_DOUBLE, id_var_yv_mask(mid,av),   &
    798816                                  'meters', '', 486, 487, 000 )
     817          CALL netcdf_create_att( id_set_mask(mid,av), id_var_yv_mask(mid,av), &
     818                                  'axis', 'Y', 000)
    799819!
    800820!--       Define UTM and geographic coordinates
     
    840860                                     NF90_DOUBLE, id_var_zs_mask(mid,av),      &
    841861                                     'meters', '', 537, 555, 000 )
     862             CALL netcdf_create_att( id_set_mask(mid,av),                      &
     863                                     id_var_zs_mask(mid,av), 'axis', 'Z', 000)
    842864          ENDIF
    843865
     
    14961518                                  'zu_3d', NF90_DOUBLE, id_var_zu_3d(av),      &
    14971519                                  'meters', '', 68, 69, 00 )
     1520          CALL netcdf_create_att( id_set_3d(av), id_var_zu_3d(av), 'axis',     &
     1521                                  'Z', 000)
    14981522!
    14991523!--       Define vertical coordinate grid (zw grid)
     
    15031527                                  'zw_3d', NF90_DOUBLE, id_var_zw_3d(av),      &
    15041528                                  'meters', '', 71, 72, 00 )
     1529          CALL netcdf_create_att( id_set_3d(av), id_var_zw_3d(av), 'axis',     &
     1530                                  'Z', 000)
    15051531!
    15061532!--       Define x-axis (for scalar position)
     
    15101536                                  NF90_DOUBLE, id_var_x_3d(av), 'meters', '',  &
    15111537                                  74, 75, 00 )
     1538          CALL netcdf_create_att( id_set_3d(av), id_var_x_3d(av), 'axis',     &
     1539                                  'X', 000)
    15121540!
    15131541!--       Define x-axis (for u position)
     
    15171545                                  NF90_DOUBLE, id_var_xu_3d(av), 'meters', '', &
    15181546                                  359, 360, 000 )
     1547          CALL netcdf_create_att( id_set_3d(av), id_var_xu_3d(av), 'axis',     &
     1548                                  'X', 000)
    15191549!
    15201550!--       Define y-axis (for scalar position)
     
    15241554                                  NF90_DOUBLE, id_var_y_3d(av), 'meters', '',  &
    15251555                                  77, 78, 00 )
     1556          CALL netcdf_create_att( id_set_3d(av), id_var_y_3d(av), 'axis',     &
     1557                                  'Y', 000)
    15261558!
    15271559!--       Define y-axis (for v position)
     
    15311563                                  NF90_DOUBLE, id_var_yv_3d(av), 'meters', '', &
    15321564                                  362, 363, 000 )
     1565          CALL netcdf_create_att( id_set_3d(av), id_var_yv_3d(av), 'axis',     &
     1566                                  'Y', 000)
    15331567!
    15341568!--       Define UTM and geographic coordinates
     
    15701604                                     'zs_3d', NF90_DOUBLE, id_var_zs_3d(av),   &
    15711605                                     'meters', '', 71, 72, 00 )
     1606             CALL netcdf_create_att( id_set_3d(av), id_var_zs_3d(av), 'axis',  &
     1607                                     'Z', 000)
    15721608
    15731609          ENDIF
     
    15791615                                     pch_index+1, id_dim_zpc_3d(av), 70 )
    15801616             !netcdf_create_dim(ncid, dim_name, ncdim_type, ncdim_id, error_no)
    1581              CALL netcdf_create_var( id_set_3d(av), (/ id_dim_zpc_3d(av) /),    &
    1582                                      'zpc_3d', NF90_DOUBLE, id_var_zpc_3d(av),   &
     1617             CALL netcdf_create_var( id_set_3d(av), (/ id_dim_zpc_3d(av) /),   &
     1618                                     'zpc_3d', NF90_DOUBLE, id_var_zpc_3d(av), &
    15831619                                     'meters', '', 71, 72, 00 )
     1620             CALL netcdf_create_att( id_set_3d(av), id_var_zpc_3d(av), 'axis', &
     1621                                     'Z', 000)
    15841622
    15851623          ENDIF
     
    24802518                                  'zu_xy', NF90_DOUBLE, id_var_zu_xy(av),      &
    24812519                                  'meters', '', 103, 104, 000 )
     2520          CALL netcdf_create_att( id_set_xy(av), id_var_zu_xy(av), 'axis',     &
     2521                                  'Z', 000)
    24822522!
    24832523!--       Define vertical coordinate grid (zw grid)
     
    24872527                                  'zw_xy', NF90_DOUBLE, id_var_zw_xy(av),      &
    24882528                                  'meters', '', 106, 107, 000 )
     2529          CALL netcdf_create_att( id_set_xy(av), id_var_zw_xy(av), 'axis',     &
     2530                                  'Z', 000)
    24892531
    24902532          IF ( land_surface )  THEN
     
    25012543                                     'zs_xy', NF90_DOUBLE, id_var_zs_xy(av),   &
    25022544                                     'meters', '', 540, 541, 000 )
     2545             CALL netcdf_create_att( id_set_xy(av), id_var_zs_xy(av), 'axis',  &
     2546                                     'Z', 000)
    25032547
    25042548          ENDIF
     
    25122556                                  'zu1_xy', NF90_DOUBLE, id_var_zu1_xy(av),    &
    25132557                                  'meters', '', 109, 110, 000 )
     2558          CALL netcdf_create_att( id_set_xy(av), id_var_zu1_xy(av), 'axis',    &
     2559                                  'Z', 000)
    25142560!
    25152561!--       Define a variable to store the layer indices of the horizontal cross
     
    25262572                                  NF90_DOUBLE, id_var_x_xy(av), 'meters', '',  &
    25272573                                  114, 115, 000 )
     2574          CALL netcdf_create_att( id_set_xy(av), id_var_x_xy(av), 'axis',      &
     2575                                  'X', 000)
    25282576!
    25292577!--       Define x-axis (for u position)
     
    25332581                                  NF90_DOUBLE, id_var_xu_xy(av), 'meters', '', &
    25342582                                  389, 390, 000 )
     2583          CALL netcdf_create_att( id_set_xy(av), id_var_xu_xy(av), 'axis',     &
     2584                                  'X', 000)
    25352585!
    25362586!--       Define y-axis (for scalar position)
     
    25402590                                  NF90_DOUBLE, id_var_y_xy(av), 'meters', '',  &
    25412591                                  117, 118, 000 )
     2592          CALL netcdf_create_att( id_set_xy(av), id_var_y_xy(av), 'axis',      &
     2593                                  'Y', 000)
    25422594!
    25432595!--       Define y-axis (for scalar position)
     
    25472599                                  NF90_DOUBLE, id_var_yv_xy(av), 'meters', '', &
    25482600                                  365, 366, 000 )
     2601          CALL netcdf_create_att( id_set_xy(av), id_var_yv_xy(av), 'axis',     &
     2602                                  'Y', 000)
    25492603!
    25502604!--       Define UTM and geographic coordinates
     
    34373491                                  'y_xz', NF90_DOUBLE, id_var_y_xz(av),        &
    34383492                                  'meters', '', 146, 147, 000 )
     3493          CALL netcdf_create_att( id_set_xz(av), id_var_y_xz(av), 'axis',      &
     3494                                  'Y', 000)
    34393495!
    34403496!--       Define y-axis (for v position)
     
    34443500                                  'yv_xz', NF90_DOUBLE, id_var_yv_xz(av),      &
    34453501                                  'meters', '', 370, 371, 000 )
     3502          CALL netcdf_create_att( id_set_xz(av), id_var_yv_xz(av), 'axis',     &
     3503                                  'Y', 000)
    34463504!
    34473505!--       Define a variable to store the layer indices of the vertical cross
     
    34583516                                  NF90_DOUBLE, id_var_x_xz(av), 'meters', '',  &
    34593517                                  151, 152, 000 )
     3518          CALL netcdf_create_att( id_set_xz(av), id_var_x_xz(av), 'axis',      &
     3519                                  'X', 000)
    34603520!
    34613521!--       Define x-axis (for u position)
     
    34653525                                  NF90_DOUBLE, id_var_xu_xz(av), 'meters', '', &
    34663526                                  373, 374, 000 )
     3527          CALL netcdf_create_att( id_set_xz(av), id_var_xu_xz(av), 'axis',     &
     3528                                  'X', 000)
     3529                                 
    34673530!
    34683531!--       Define the three z-axes (zu, zw, and zs)
     
    34723535                                  NF90_DOUBLE, id_var_zu_xz(av), 'meters', '', &
    34733536                                  154, 155, 000 )
     3537          CALL netcdf_create_att( id_set_xz(av), id_var_zu_xz(av), 'axis',     &
     3538                                  'Z', 000)
     3539                                 
    34743540          CALL netcdf_create_dim( id_set_xz(av), 'zw', nz+2, id_dim_zw_xz(av), &
    34753541                                  156 )
     
    34773543                                  NF90_DOUBLE, id_var_zw_xz(av), 'meters', '', &
    34783544                                  157, 158, 000 )
     3545          CALL netcdf_create_att( id_set_xz(av), id_var_zw_xz(av), 'axis',     &
     3546                                  'Z', 000)
    34793547!
    34803548!--       Define UTM and geographic coordinates
     
    34953563                                     'zs', NF90_DOUBLE, id_var_zs_xz(av),      &
    34963564                                     'meters', '', 543, 544, 000 )
     3565             CALL netcdf_create_att( id_set_xz(av), id_var_zs_xz(av), 'axis',  &
     3566                                     'Z', 000)
    34973567
    34983568          ENDIF
     
    42994369                                  'x_yz', NF90_DOUBLE, id_var_x_yz(av),        &
    43004370                                  'meters', '', 185, 186, 000 )
     4371          CALL netcdf_create_att( id_set_yz(av), id_var_x_yz(av), 'axis',      &
     4372                                  'X', 000)
    43014373!
    43024374!--       Define x axis (for u position)
     
    43064378                                  'xu_yz', NF90_DOUBLE, id_var_xu_yz(av),      &
    43074379                                  'meters', '', 378, 379, 000 )
     4380          CALL netcdf_create_att( id_set_yz(av), id_var_xu_yz(av), 'axis',     &
     4381                                  'X', 000)
    43084382!
    43094383!--       Define a variable to store the layer indices of the vertical cross
     
    43204394                                  NF90_DOUBLE, id_var_y_yz(av), 'meters', '',  &
    43214395                                  190, 191, 000 )
     4396          CALL netcdf_create_att( id_set_yz(av), id_var_y_yz(av), 'axis',      &
     4397                                  'Y', 000)
    43224398!
    43234399!--       Define y-axis (for v position)
     
    43274403                                  NF90_DOUBLE, id_var_yv_yz(av), 'meters', '', &
    43284404                                  381, 382, 000 )
     4405          CALL netcdf_create_att( id_set_yz(av), id_var_yv_yz(av), 'axis',     &
     4406                                  'Y', 000)
    43294407!
    43304408!--       Define the two z-axes (zu and zw)
     
    43344412                                  NF90_DOUBLE, id_var_zu_yz(av), 'meters', '', &
    43354413                                  193, 194, 000 )
     4414          CALL netcdf_create_att( id_set_yz(av), id_var_zu_yz(av), 'axis',     &
     4415                                  'Z', 000)
    43364416
    43374417          CALL netcdf_create_dim( id_set_yz(av), 'zw', nz+2, id_dim_zw_yz(av), &
     
    43404420                                  NF90_DOUBLE, id_var_zw_yz(av), 'meters', '', &
    43414421                                  196, 197, 000 )
     4422          CALL netcdf_create_att( id_set_yz(av), id_var_zw_yz(av), 'axis',     &
     4423                                  'Z', 000)
    43424424!
    43434425!--       Define UTM and geographic coordinates
     
    43584440                                     'zs', NF90_DOUBLE, id_var_zs_yz(av),      &
    43594441                                     'meters', '', 546, 547, 000 )
     4442             CALL netcdf_create_att( id_set_yz(av), id_var_zs_yz(av), 'axis',  &
     4443                                     'Z', 000)
    43604444
    43614445          ENDIF
     
    52825366                                       NF90_DOUBLE, id_var_z_pr(i,0),          &
    52835367                                       'meters', '', 224, 225, 000 )
     5368                CALL netcdf_create_att( id_set_pr, id_var_z_pr(i,0), 'axis',   &
     5369                                        'Z', 000)
    52845370!
    52855371!--             Define the variable
     
    53105396                                           id_var_z_pr(i,j), 'meters', '',     &
    53115397                                           230, 231, 000 )
     5398                   CALL netcdf_create_att( id_set_pr, id_var_z_pr(i,j), 'axis',&
     5399                                           'Z', 000)
    53125400!
    53135401!--                Define the variable
     
    57325820                                  NF90_DOUBLE, id_var_zu_sp, 'meters', '',     &
    57335821                                  274, 275, 000 )
     5822          CALL netcdf_create_att( id_set_sp, id_var_zu_sp, 'axis', 'Z', 000)
    57345823!
    57355824!--       Define vertical coordinate grid (zw grid)
     
    57385827                                  NF90_DOUBLE, id_var_zw_sp, 'meters', '',     &
    57395828                                  277, 278, 000 )
     5829          CALL netcdf_create_att( id_set_sp, id_var_zw_sp, 'axis', 'Z', 000)
    57405830!
    57415831!--       Define x-axis
     
    57445834                                  NF90_DOUBLE, id_var_x_sp, 'm-1', '', 280,    &
    57455835                                  281, 000 )
     5836          CALL netcdf_create_att( id_set_sp, id_var_x_sp, 'axis', 'X', 000)
    57465837!
    57475838!--       Define y-axis
     
    57505841                                  NF90_DOUBLE, id_var_y_sp, 'm-1', '', 283,    &
    57515842                                  284, 000 )
     5843          CALL netcdf_create_att( id_set_sp, id_var_y_sp, 'axis', 'Y', 000)
    57525844!
    57535845!--       Define the variables
Note: See TracChangeset for help on using the changeset viewer.