[3000] | 1 | #define __MYFILE__ 'omonainfo.F90' |
---|
| 2 | MODULE omonainfo |
---|
| 3 | |
---|
| 4 | ! Specific utilities for omona files |
---|
| 5 | ! |
---|
| 6 | ! History |
---|
| 7 | ! Original: Magdalena A. Balmaseda |
---|
| 8 | ! 2010: Split as to remove "scale factor information", |
---|
| 9 | ! which is now in auxgrid |
---|
| 10 | ! |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | USE netcdf |
---|
| 14 | USE nctools |
---|
| 15 | USE ioncdf |
---|
| 16 | USE coords |
---|
| 17 | ! USE orcagrid |
---|
| 18 | |
---|
| 19 | CHARACTER(len=4) :: cl_expnam |
---|
| 20 | CHARACTER(len=8) :: cl_date |
---|
| 21 | CHARACTER(len=80) :: cl_filename_out |
---|
| 22 | CHARACTER(len=80) :: cl_filename2_out |
---|
| 23 | CHARACTER(len=3) :: cl_code |
---|
| 24 | CHARACTER(len=1) :: cl_grid |
---|
| 25 | CHARACTER(len=80) :: cl_var,cl_var_out |
---|
| 26 | CHARACTER(len=80) :: cl_varname1, cl_varname2, cl_varunit1, cl_varunit2 |
---|
| 27 | CHARACTER(len=1) :: sec !o =box average omona |
---|
| 28 | !x =zonal section. Integral along x |
---|
| 29 | !y =meridional section. Integral along y |
---|
| 30 | |
---|
| 31 | CHARACTER(len=1) :: grid0='?' |
---|
| 32 | |
---|
| 33 | INTEGER :: i_nb_dims,i_dp |
---|
| 34 | INTEGER :: i_fill |
---|
| 35 | REAL, DIMENSION(:,:), ALLOCATABLE :: z_var_2d |
---|
| 36 | REAL, DIMENSION(:,:,:), ALLOCATABLE :: z_var_3d |
---|
| 37 | REAL, DIMENSION(:), ALLOCATABLE :: z_dep2 |
---|
| 38 | |
---|
| 39 | PUBLIC :: variable_att, write_omona_netcdf, & |
---|
| 40 | & write_dep_netcdf, create_time_series_netcdf_file |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | INTERFACE write_omona_netcdf |
---|
| 44 | MODULE PROCEDURE write_omona_netcdf_2d_r, write_omona_netcdf_3d_r |
---|
| 45 | END INTERFACE |
---|
| 46 | |
---|
| 47 | CONTAINS |
---|
| 48 | |
---|
| 49 | ! |
---|
| 50 | !---------------------------------------------------------------------- |
---|
| 51 | ! |
---|
| 52 | ! W R I T E _ O M O N A _ N E T C D F |
---|
| 53 | ! |
---|
| 54 | !---------------------------------------------------------------------- |
---|
| 55 | ! |
---|
| 56 | SUBROUTINE write_omona_netcdf_2d_r (cl_filename, z_field,i_time, & |
---|
| 57 | cl_boxes, z_missing,i_fill) |
---|
| 58 | ! |
---|
| 59 | ! write a 2d array (time_serie) of reals |
---|
| 60 | ! |
---|
| 61 | IMPLICIT NONE |
---|
| 62 | ! |
---|
| 63 | CHARACTER(len=80), INTENT(in) :: cl_filename |
---|
| 64 | INTEGER, DIMENSION(:), INTENT(in) :: i_time |
---|
| 65 | INTEGER, INTENT(inout) :: i_fill |
---|
| 66 | REAL, DIMENSION(:,:), INTENT(in) :: z_field |
---|
| 67 | REAL, INTENT(in) :: z_missing |
---|
| 68 | CHARACTER(len=20), DIMENSION(:), INTENT(in) :: cl_boxes |
---|
| 69 | |
---|
| 70 | ! |
---|
| 71 | LOGICAL :: clbon |
---|
| 72 | INTEGER :: i_var_exist, i_pos |
---|
| 73 | INTEGER :: i_file_id, i_var_id |
---|
| 74 | INTEGER :: i_nb_files,i_z, i_b |
---|
| 75 | INTEGER :: i_tim_id,i_box_id |
---|
| 76 | INTEGER :: i_time_var |
---|
| 77 | INTEGER :: i_file |
---|
| 78 | INTEGER, DIMENSION(2) :: i_dim, i_tab_start, i_tab_count |
---|
| 79 | INTEGER :: i_rest_start, i_rest_end |
---|
| 80 | INTEGER :: i_time0, i_time1 |
---|
| 81 | REAL :: z_min, z_max |
---|
| 82 | REAL :: z_min_old, z_max_old |
---|
| 83 | INTEGER, DIMENSION(:), ALLOCATABLE :: i_time_old |
---|
| 84 | INTEGER, DIMENSION(:), ALLOCATABLE :: i_time_rest |
---|
| 85 | INTEGER :: i_t |
---|
| 86 | REAL, DIMENSION(:,:), ALLOCATABLE :: z_old_2d |
---|
| 87 | ! |
---|
| 88 | i_tab_start(1) = 1 |
---|
| 89 | i_z=1 |
---|
| 90 | i_b=SIZE(z_field,1) |
---|
| 91 | i_nb_files = SIZE(z_field,2) |
---|
| 92 | i_tab_count(1) = i_b |
---|
| 93 | i_tab_count(2) = i_nb_files |
---|
| 94 | i_rest_start = 0 |
---|
| 95 | i_rest_end = 0 |
---|
| 96 | i_time0 = 0 |
---|
| 97 | i_time1 = 0 |
---|
| 98 | |
---|
| 99 | WRITE(6,*)' Input time dimensions ',i_nb_files |
---|
| 100 | WRITE(6,*)' file for output ',cl_filename |
---|
| 101 | ! |
---|
| 102 | z_min = MINVAL(z_field, mask = z_field .NE. z_missing ) |
---|
| 103 | z_max = MAXVAL(z_field, mask = z_field .NE. z_missing ) |
---|
| 104 | ! |
---|
| 105 | |
---|
| 106 | INQUIRE( FILE=cl_filename_out, EXIST=clbon ) |
---|
| 107 | WRITE(*,*)' Inquiring clbon ',clbon |
---|
| 108 | IF ( .NOT. clbon ) THEN |
---|
| 109 | CALL create_time_series_netcdf_file ( cl_filename, cl_boxes) |
---|
| 110 | ELSE |
---|
| 111 | WRITE(*,*)' Time series file already exists' |
---|
| 112 | ENDIF |
---|
| 113 | ! |
---|
| 114 | WRITE(*,*)' opening file ',cl_filename |
---|
| 115 | CALL nchdlerr( nf90_open( cl_filename, nf90_write, i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 116 | ! |
---|
| 117 | |
---|
| 118 | WRITE(*,*)' Inquiring var ',cl_var_out |
---|
| 119 | i_var_exist = nf90_inq_varid( i_file_id, cl_var_out, i_var_id ) |
---|
| 120 | WRITE(*,*)' i_var_exist ',i_var_exist, i_var_id |
---|
| 121 | IF ( i_var_exist .NE. 0 ) THEN |
---|
| 122 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'time', i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 123 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'box', i_box_id ) ,__LINE__,__MYFILE__) |
---|
| 124 | i_dim(1) = i_box_id |
---|
| 125 | i_dim(2) = i_tim_id |
---|
| 126 | ! write(*,*)' i_dim ',i_dim |
---|
| 127 | ! |
---|
| 128 | CALL nchdlerr( nf90_redef(i_file_id) ,__LINE__,__MYFILE__) |
---|
| 129 | CALL nchdlerr( nf90_def_var(i_file_id, cl_var_out, nf90_real, i_dim, i_var_id ) ,__LINE__,__MYFILE__) |
---|
| 130 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'standard_name', cl_varname1 ) ,__LINE__,__MYFILE__) |
---|
| 131 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'long_name', cl_varname2 ) ,__LINE__,__MYFILE__) |
---|
| 132 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'units',cl_varunit1 ) ,__LINE__,__MYFILE__) |
---|
| 133 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'unit_long',cl_varunit2 ) ,__LINE__,__MYFILE__) |
---|
| 134 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'missing_value', z_missing ) ,__LINE__,__MYFILE__) |
---|
| 135 | WRITE(*,*)'nf_put valid_min ',z_min |
---|
| 136 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_min', z_min ) ,__LINE__,__MYFILE__) |
---|
| 137 | WRITE(*,*)'nf_put valid_max ',z_max |
---|
| 138 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_max', z_max ) ,__LINE__,__MYFILE__) |
---|
| 139 | |
---|
| 140 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 141 | |
---|
| 142 | CALL nchdlerr( nf90_inq_varid( i_file_id, 'time', i_time_var ) ,__LINE__,__MYFILE__) |
---|
| 143 | i_pos = 1 |
---|
| 144 | i_tab_start(2)=1 |
---|
| 145 | ELSE |
---|
| 146 | CALL nchdlerr( nf90_get_att( i_file_id, i_var_id, 'valid_min', z_min_old ) ,__LINE__,__MYFILE__) |
---|
| 147 | CALL nchdlerr( nf90_get_att( i_file_id, i_var_id, 'valid_max', z_max_old ) ,__LINE__,__MYFILE__) |
---|
| 148 | z_min = MIN( z_min, z_min_old ) |
---|
| 149 | z_max = MAX( z_max, z_max_old ) |
---|
| 150 | CALL nchdlerr( nf90_redef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 151 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_min', z_min ) ,__LINE__,__MYFILE__) |
---|
| 152 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_max', z_max ) ,__LINE__,__MYFILE__) |
---|
| 153 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 154 | |
---|
| 155 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'time', i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 156 | |
---|
| 157 | CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_tim_id,len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 158 | ALLOCATE(i_time_old(i_pos)) |
---|
| 159 | |
---|
| 160 | CALL nchdlerr( nf90_inq_varid( i_file_id, 'time', i_time_var ) ,__LINE__,__MYFILE__) |
---|
| 161 | |
---|
| 162 | CALL nchdlerr( nf90_get_var( i_file_id, i_time_var, i_time_old ) ,__LINE__,__MYFILE__) |
---|
| 163 | i_tab_start(2)=i_pos+1 |
---|
| 164 | DO i_t=i_pos,1,-1 |
---|
| 165 | IF(i_time_old(i_t).GE.i_time(1)) THEN |
---|
| 166 | i_tab_start(2)=i_t |
---|
| 167 | ELSE |
---|
| 168 | EXIT |
---|
| 169 | ENDIF |
---|
| 170 | ENDDO |
---|
| 171 | WRITE(*,*)' i_tab_start(2)',i_tab_start(2) |
---|
| 172 | |
---|
| 173 | IF (I_FILL == 1 ) THEN |
---|
| 174 | DO i_t=1,i_tab_start(2),1 |
---|
| 175 | IF(i_time_old(i_t).LT.i_time(1)) THEN |
---|
| 176 | i_time0=i_t+1 |
---|
| 177 | ELSE |
---|
| 178 | EXIT |
---|
| 179 | ENDIF |
---|
| 180 | ENDDO |
---|
| 181 | WRITE(*,*)' i_tab_start(2), i_time0',i_tab_start(2),i_time0 |
---|
| 182 | i_time0=min(i_time0,i_tab_start(2)) |
---|
| 183 | i_tab_start(2)=i_time0 |
---|
| 184 | i_time1=i_tab_start(2)+i_tab_count(2)-1 |
---|
| 185 | WRITE(*,*)' Starting at time ',i_time_old(i_tab_start(2)-1),i_time(1) |
---|
| 186 | i_rest_start=i_time1+1 |
---|
| 187 | i_rest_end = i_pos |
---|
| 188 | IF ( i_rest_end .gt. i_rest_start ) THEN |
---|
| 189 | ALLOCATE( z_old_2d(i_b, i_pos)) |
---|
| 190 | CALL nchdlerr( nf90_get_var( i_file_id, i_var_id, z_old_2d ) ,__LINE__,__MYFILE__) |
---|
| 191 | z_old_2d(:,i_time0:i_time1)=z_field |
---|
| 192 | i_time_old(i_time0:i_time1)=i_time |
---|
| 193 | i_tab_start(2)=1 |
---|
| 194 | i_tab_count(2)=i_pos |
---|
| 195 | WRITE(*,*)' writing output I_FILL i_time0 ',i_time0 |
---|
| 196 | WRITE(*,*)' writing output I_FILL i_time1 ',i_time1 |
---|
| 197 | CALL nchdlerr( nf90_put_var( i_file_id, i_var_id, & |
---|
| 198 | & z_old_2d, start=i_tab_start, count=i_tab_count),__LINE__,__MYFILE__) |
---|
| 199 | CALL nchdlerr( nf90_put_var( i_file_id, i_time_var, & |
---|
| 200 | & i_time_old,start=(/i_tab_start(2)/), count=(/i_tab_count(2)/)),__LINE__,__MYFILE__) |
---|
| 201 | ELSE |
---|
| 202 | I_FILL = 0 |
---|
| 203 | DEALLOCATE(i_time_old) |
---|
| 204 | DEALLOCATE(i_time_rest) |
---|
| 205 | DEALLOCATE(z_old_2d) |
---|
| 206 | ENDIF |
---|
| 207 | ELSE |
---|
| 208 | WRITE(*,*)' Starting at time ',i_time_old(i_tab_start(2)-1),i_time(1) |
---|
| 209 | DEALLOCATE(i_time_old) |
---|
| 210 | ENDIF |
---|
| 211 | ENDIF |
---|
| 212 | ! |
---|
| 213 | IF ( I_FILL == 0 ) THEN |
---|
| 214 | WRITE(*,*)' writing output start ',i_tab_start |
---|
| 215 | WRITE(*,*)' writing output count ',i_tab_count |
---|
| 216 | CALL nchdlerr( nf90_put_var( i_file_id, i_var_id, & |
---|
| 217 | & z_field, start=i_tab_start, count=i_tab_count),__LINE__,__MYFILE__) |
---|
| 218 | |
---|
| 219 | CALL nchdlerr( nf90_put_var( i_file_id, i_time_var, & |
---|
| 220 | & i_time,start=(/i_tab_start(2)/), count=(/i_tab_count(2)/)),__LINE__,__MYFILE__) |
---|
| 221 | ENDIF |
---|
| 222 | |
---|
| 223 | ! |
---|
| 224 | |
---|
| 225 | CALL nchdlerr( nf90_close( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 226 | ! |
---|
| 227 | RETURN |
---|
| 228 | ! |
---|
| 229 | END SUBROUTINE write_omona_netcdf_2d_r |
---|
| 230 | ! |
---|
| 231 | !---------------------------------------------------------------------- |
---|
| 232 | ! |
---|
| 233 | SUBROUTINE write_omona_netcdf_3d_r (cl_filename, z_field,i_time, & |
---|
| 234 | cl_boxes, z_missing, i_fill) |
---|
| 235 | ! |
---|
| 236 | ! write a 3d array (time_serie) of reals |
---|
| 237 | ! |
---|
| 238 | IMPLICIT NONE |
---|
| 239 | ! |
---|
| 240 | CHARACTER(len=80), INTENT(in) :: cl_filename |
---|
| 241 | INTEGER, DIMENSION(:), INTENT(in) :: i_time |
---|
| 242 | INTEGER, INTENT(inout) :: i_fill |
---|
| 243 | REAL, DIMENSION(:,:,:), INTENT(in) :: z_field |
---|
| 244 | REAL, INTENT(in) :: z_missing |
---|
| 245 | CHARACTER(len=20), DIMENSION(:), INTENT(in) :: cl_boxes |
---|
| 246 | |
---|
| 247 | ! |
---|
| 248 | LOGICAL :: clbon |
---|
| 249 | INTEGER :: i_var_exist, i_pos |
---|
| 250 | INTEGER :: i_file_id, i_var_id |
---|
| 251 | INTEGER :: i_nb_files,i_z,i_b |
---|
| 252 | INTEGER :: i_tim_id,i_box_id,i_z_id |
---|
| 253 | INTEGER :: i_time_var |
---|
| 254 | INTEGER :: i_file |
---|
| 255 | INTEGER, DIMENSION(3) :: i_dim, i_tab_start, i_tab_count |
---|
| 256 | INTEGER :: i_rest_start, i_rest_end |
---|
| 257 | INTEGER :: i_time0, i_time1 |
---|
| 258 | REAL :: z_min, z_max |
---|
| 259 | REAL :: z_min_old, z_max_old |
---|
| 260 | INTEGER, DIMENSION(:), ALLOCATABLE :: i_time_old |
---|
| 261 | INTEGER, DIMENSION(:), ALLOCATABLE :: i_time_rest |
---|
| 262 | INTEGER :: i_t |
---|
| 263 | REAL, DIMENSION(:,:,:), ALLOCATABLE :: z_old_3d |
---|
| 264 | ! |
---|
| 265 | i_tab_start(1) = 1 |
---|
| 266 | i_tab_start(2) = 1 |
---|
| 267 | i_tab_start(3) = 1 |
---|
| 268 | i_z=SIZE(z_field,1) !depth |
---|
| 269 | i_b=SIZE(z_field,2) !nbox |
---|
| 270 | i_nb_files = SIZE(z_field,3) |
---|
| 271 | i_tab_count(1) = i_z |
---|
| 272 | i_tab_count(2) = i_b |
---|
| 273 | i_tab_count(3) = i_nb_files |
---|
| 274 | i_time0 = 0 |
---|
| 275 | i_time1 = 0 |
---|
| 276 | i_rest_start = 0 |
---|
| 277 | i_rest_end = 0 |
---|
| 278 | |
---|
| 279 | ! write(6,*)' in write_3d ,shape(z_field) ',shape(z_field) |
---|
| 280 | ! write(6,*)' i_z =',i_z |
---|
| 281 | ! write(6,*)' i_b =',i_b |
---|
| 282 | ! write(6,*)' i_nb_files =',i_nb_files |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | ! |
---|
| 286 | z_min = MINVAL(z_field, mask = z_field .NE. z_missing ) |
---|
| 287 | z_max = MAXVAL(z_field, mask = z_field .NE. z_missing ) |
---|
| 288 | ! |
---|
| 289 | INQUIRE( FILE=cl_filename, EXIST=clbon ) |
---|
| 290 | IF ( .NOT. clbon ) THEN |
---|
| 291 | CALL create_time_series_netcdf_file ( cl_filename, cl_boxes) |
---|
| 292 | ELSE |
---|
| 293 | WRITE(*,*)' Time series file already exists' |
---|
| 294 | ENDIF |
---|
| 295 | ! |
---|
| 296 | WRITE(*,*)' opening file ',cl_filename |
---|
| 297 | CALL nchdlerr( nf90_open( cl_filename, nf90_write, i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 298 | ! |
---|
| 299 | WRITE(*,*)'Inquiring var ',cl_var_out, i_var_id |
---|
| 300 | i_var_exist = nf90_inq_varid( i_file_id, cl_var_out, i_var_id) |
---|
| 301 | WRITE(*,*)'i_var_exist ',i_var_exist |
---|
| 302 | |
---|
| 303 | IF ( i_var_exist .NE. 0 ) THEN |
---|
| 304 | ! write(*,*)' Inquiring dimensions' |
---|
| 305 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'depth', i_z_id ) ,__LINE__,__MYFILE__) |
---|
| 306 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'box', i_box_id ) ,__LINE__,__MYFILE__) |
---|
| 307 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'time', i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 308 | |
---|
| 309 | i_dim(1) = i_z_id |
---|
| 310 | i_dim(2) = i_box_id |
---|
| 311 | i_dim(3) = i_tim_id |
---|
| 312 | ! write(*,*)' In write_omona_ncdf_3d: Dimensions: i_dim ',i_dim |
---|
| 313 | |
---|
| 314 | |
---|
| 315 | CALL nchdlerr( nf90_redef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 316 | CALL nchdlerr( nf90_def_var( i_file_id, cl_var_out, nf90_real,i_dim, i_var_id ) ,__LINE__,__MYFILE__) |
---|
| 317 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'standard_name', cl_varname1 ),__LINE__,__MYFILE__ ) |
---|
| 318 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'long_name', cl_varname2 ) ,__LINE__,__MYFILE__) |
---|
| 319 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'units', cl_varunit1 ) ,__LINE__,__MYFILE__) |
---|
| 320 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'unit_long', cl_varunit2 ) ,__LINE__,__MYFILE__) |
---|
| 321 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'missing_value', z_missing ) ,__LINE__,__MYFILE__) |
---|
| 322 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_min', z_min ) ,__LINE__,__MYFILE__) |
---|
| 323 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_max', z_max ) ,__LINE__,__MYFILE__) |
---|
| 324 | ! |
---|
| 325 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 326 | |
---|
| 327 | ! CALL nchdlerr( nf90_inq_dimid( i_file_id, 'time', i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 328 | ! write(6,*)' inq_dimid ',i_tim_id |
---|
| 329 | CALL nchdlerr( nf90_inq_varid( i_file_id, 'time', i_time_var ) ,__LINE__,__MYFILE__) |
---|
| 330 | WRITE(*,*) 'inq_varid i_tim_id for var time ',i_time_var |
---|
| 331 | i_pos = 1 |
---|
| 332 | i_tab_start(3)=1 |
---|
| 333 | ELSE |
---|
| 334 | !new addition |
---|
| 335 | ! CALL nchdlerr (nf90_inquire_variable( i_file_id, i_var_id, dimids=i_dim ) ,__LINE__,__MYFILE__) |
---|
| 336 | ! write(6,*)' after inquire variable i_dim = ',i_dim |
---|
| 337 | ! CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_dim(1), len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 338 | ! write(6,*)' i_dim(1), len(1) ',i_dim(1),i_pos |
---|
| 339 | ! CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_dim(2), len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 340 | ! write(6,*)' i_dim(2), len(2) ',i_dim(2),i_pos |
---|
| 341 | ! CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_dim(3), len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 342 | ! write(6,*)' i_dim(3), len(3) ',i_dim(3),i_pos |
---|
| 343 | !!!! |
---|
| 344 | |
---|
| 345 | CALL nchdlerr( nf90_get_att( i_file_id, i_var_id, 'valid_min', z_min_old ) ,__LINE__,__MYFILE__) |
---|
| 346 | CALL nchdlerr( nf90_get_att( i_file_id, i_var_id, 'valid_max', z_max_old ) ,__LINE__,__MYFILE__) |
---|
| 347 | z_min = MIN( z_min, z_min_old ) |
---|
| 348 | z_max = MAX( z_max, z_max_old ) |
---|
| 349 | CALL nchdlerr( nf90_redef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 350 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_min', z_min ) ,__LINE__,__MYFILE__) |
---|
| 351 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_max', z_max ) ,__LINE__,__MYFILE__) |
---|
| 352 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 353 | |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | ! CALL nchdlerr( nf90_inq_varid( i_file_id, 'depth', i_z_id ) ,__LINE__,__MYFILE__) |
---|
| 357 | ! CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_z_id, len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 358 | ! write(*,*)' i_z_id, dim ',i_z_id,i_pos |
---|
| 359 | |
---|
| 360 | ! CALL nchdlerr( nf90_inq_varid( i_file_id, 'box', i_box_id ) ,__LINE__,__MYFILE__) |
---|
| 361 | ! CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_box_id, len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 362 | ! write(*,*)' i_box_id, dim ',i_box_id,i_pos |
---|
| 363 | |
---|
| 364 | |
---|
| 365 | |
---|
| 366 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'time', i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 367 | ! write(6,*)' inq_dimid ',i_tim_id |
---|
| 368 | CALL nchdlerr( nf90_inquire_dimension( i_file_id, i_tim_id, len=i_pos ) ,__LINE__,__MYFILE__) |
---|
| 369 | ! write(*,*) 'inq_var_id i_tim_id,dim ',i_tim_id,i_pos |
---|
| 370 | ALLOCATE(i_time_old(i_pos)) |
---|
| 371 | CALL nchdlerr( nf90_inq_varid( i_file_id, 'time', i_time_var ) ,__LINE__,__MYFILE__) |
---|
| 372 | ! write(*,*) 'inq_var_id time',i_time_var |
---|
| 373 | CALL nchdlerr( nf90_get_var( i_file_id, i_time_var, i_time_old ) ,__LINE__,__MYFILE__) |
---|
| 374 | i_tab_start(3)=i_pos+1 |
---|
| 375 | DO i_t=i_pos,1,-1 |
---|
| 376 | IF(i_time_old(i_t).GE.i_time(1)) THEN |
---|
| 377 | i_tab_start(3)=i_t |
---|
| 378 | ELSE |
---|
| 379 | EXIT |
---|
| 380 | ENDIF |
---|
| 381 | ENDDO |
---|
| 382 | |
---|
| 383 | WRITE(*,*)'i_tab_start(3)',i_tab_start(3) |
---|
| 384 | WRITE(*,*)'i_tab_count(3)',i_tab_count(3) |
---|
| 385 | |
---|
| 386 | IF (I_FILL == 1 ) THEN |
---|
| 387 | DO i_t=1,i_tab_start(3),1 |
---|
| 388 | IF(i_time_old(i_t).LT.i_time(1)) THEN |
---|
| 389 | i_time0=i_t+1 |
---|
| 390 | ELSE |
---|
| 391 | EXIT |
---|
| 392 | ENDIF |
---|
| 393 | ENDDO |
---|
| 394 | |
---|
| 395 | i_time0=min(i_time0,i_tab_start(3)) |
---|
| 396 | i_tab_start(3)=i_time0 |
---|
| 397 | i_time1=i_time0+i_tab_count(3)-1 |
---|
| 398 | WRITE(*,*)'i_time0,i_tab_count(3),i_time1',i_Time0,i_tab_count(3),i_time1 |
---|
| 399 | WRITE(*,*)' Starting at time ',i_time_old(i_tab_start(3)-1),i_time(1) |
---|
| 400 | i_rest_start=i_time1+1 |
---|
| 401 | i_rest_end = i_pos |
---|
| 402 | IF ( i_rest_end .gt. i_rest_start ) THEN |
---|
| 403 | ALLOCATE( z_old_3d(i_z,i_b, i_pos)) |
---|
| 404 | CALL nchdlerr( nf90_get_var( i_file_id, i_var_id, z_old_3d ) ,__LINE__,__MYFILE__) |
---|
| 405 | z_old_3d(:,:,i_time0:i_time1)=z_field |
---|
| 406 | i_time_old(i_time0:i_time1)=i_time |
---|
| 407 | i_tab_start(3)=1 |
---|
| 408 | i_tab_count(3)=i_pos |
---|
| 409 | WRITE(*,*)' writing output I_FILL i_time0 ',i_time0 |
---|
| 410 | WRITE(*,*)' writing output I_FILL i_time1 ',i_time1 |
---|
| 411 | CALL nchdlerr( nf90_put_var( i_file_id, i_var_id, & |
---|
| 412 | & z_old_3d, start=i_tab_start, count=i_tab_count),__LINE__,__MYFILE__) |
---|
| 413 | CALL nchdlerr( nf90_put_var( i_file_id, i_time_var, & |
---|
| 414 | & i_time_old,start=(/i_tab_start(3)/), count=(/i_tab_count(3)/)),__LINE__,__MYFILE__) |
---|
| 415 | ELSE |
---|
| 416 | I_FILL = 0 |
---|
| 417 | DEALLOCATE(i_time_old) |
---|
| 418 | DEALLOCATE(i_time_rest) |
---|
| 419 | DEALLOCATE(z_old_3d) |
---|
| 420 | ENDIF |
---|
| 421 | ELSE |
---|
| 422 | WRITE(*,*)' Starting at time ',i_time_old(i_tab_start(3)-1),i_time(1) |
---|
| 423 | DEALLOCATE(i_time_old) |
---|
| 424 | ENDIF |
---|
| 425 | ENDIF |
---|
| 426 | ! |
---|
| 427 | IF ( I_FILL == 0 ) THEN |
---|
| 428 | WRITE(*,*)' writing output count ',i_tab_count |
---|
| 429 | WRITE(*,*)' writing output start ',i_tab_start |
---|
| 430 | CALL nchdlerr( nf90_put_var( i_file_id, i_var_id, & |
---|
| 431 | z_field, start=i_tab_start, count=i_tab_count),__LINE__,__MYFILE__) |
---|
| 432 | CALL nchdlerr( nf90_put_var( i_file_id, i_time_var, & |
---|
| 433 | i_time,start=(/i_tab_start(3)/), count=(/i_tab_count(3)/) ),__LINE__,__MYFILE__) |
---|
| 434 | ENDIF |
---|
| 435 | ! |
---|
| 436 | CALL nchdlerr( nf90_close( i_file_id ),__LINE__,__MYFILE__ ) |
---|
| 437 | ! |
---|
| 438 | RETURN |
---|
| 439 | ! |
---|
| 440 | END SUBROUTINE write_omona_netcdf_3d_r |
---|
| 441 | !!---------------------------------------------------------------------- |
---|
| 442 | ! |
---|
| 443 | SUBROUTINE write_dep_netcdf ( cl_filename, cl_boxes, z_dep ) |
---|
| 444 | ! |
---|
| 445 | ! write a 2d array (map) of reals |
---|
| 446 | ! |
---|
| 447 | IMPLICIT NONE |
---|
| 448 | ! |
---|
| 449 | CHARACTER(len=80), INTENT(in) :: cl_filename |
---|
| 450 | CHARACTER(len=20), DIMENSION(:), INTENT(in) :: cl_boxes |
---|
| 451 | REAL, DIMENSION(:), INTENT(in) :: z_dep |
---|
| 452 | ! |
---|
| 453 | LOGICAL :: clbon |
---|
| 454 | INTEGER :: i_file_id, i_var_id |
---|
| 455 | INTEGER :: i_dim_z_id |
---|
| 456 | INTEGER :: i_dimz, i_var_exist |
---|
| 457 | INTEGER, DIMENSION(1) :: i_dim |
---|
| 458 | REAL :: z_min, z_max |
---|
| 459 | ! |
---|
| 460 | i_dimz = i_dp |
---|
| 461 | ! |
---|
| 462 | z_min = MINVAL(z_dep) |
---|
| 463 | z_max = MAXVAL(z_dep) |
---|
| 464 | ! |
---|
| 465 | INQUIRE( FILE=cl_filename, EXIST=clbon ) |
---|
| 466 | IF ( .NOT. clbon ) THEN |
---|
| 467 | CALL create_time_series_netcdf_file ( cl_filename, cl_boxes ) |
---|
| 468 | ELSE |
---|
| 469 | WRITE(*,*)' Time series file already exists' |
---|
| 470 | ENDIF |
---|
| 471 | ! |
---|
| 472 | CALL nchdlerr( nf90_open( cl_filename, nf90_write, i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 473 | ! |
---|
| 474 | CALL nchdlerr( nf90_inq_dimid( i_file_id, 'depth', i_dim_z_id ) ,__LINE__,__MYFILE__) |
---|
| 475 | i_dim(1) = i_dim_z_id |
---|
| 476 | ! write(6,*)' defining depth axis : i_dim(1)= ',i_dim(1) |
---|
| 477 | ! |
---|
| 478 | i_var_exist = nf90_inq_varid( i_file_id, "depth", i_var_id ) |
---|
| 479 | IF ( i_var_exist .NE. 0 ) THEN |
---|
| 480 | CALL nchdlerr( nf90_redef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 481 | CALL nchdlerr( nf90_def_var( i_file_id, "depth", nf90_real,i_dim, i_var_id ) ,__LINE__,__MYFILE__) |
---|
| 482 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'standard_name','depth') ,__LINE__,__MYFILE__) |
---|
| 483 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'long_name', 'depth below the surface') ,__LINE__,__MYFILE__) |
---|
| 484 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'units', 'm' ) ,__LINE__,__MYFILE__) |
---|
| 485 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'unit_long','meter' ) ,__LINE__,__MYFILE__) |
---|
| 486 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_min', z_min ) ,__LINE__,__MYFILE__) |
---|
| 487 | CALL nchdlerr( nf90_put_att( i_file_id, i_var_id, 'valid_max', z_max ) ,__LINE__,__MYFILE__) |
---|
| 488 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 489 | ENDIF |
---|
| 490 | ! |
---|
| 491 | CALL nchdlerr( nf90_put_var( i_file_id, i_var_id, z_dep) ,__LINE__,__MYFILE__) |
---|
| 492 | ! |
---|
| 493 | CALL nchdlerr( nf90_close( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 494 | ! |
---|
| 495 | RETURN |
---|
| 496 | ! |
---|
| 497 | END SUBROUTINE write_dep_netcdf |
---|
| 498 | ! |
---|
| 499 | ! |
---|
| 500 | !---------------------------------------------------------------------- |
---|
| 501 | ! |
---|
| 502 | ! C R E A T E _ T I M E _ S E R I E S _ N E T C D F _ F I L E |
---|
| 503 | ! |
---|
| 504 | !---------------------------------------------------------------------- |
---|
| 505 | ! |
---|
| 506 | SUBROUTINE create_time_series_netcdf_file ( cl_filename,cl_boxes) |
---|
| 507 | ! |
---|
| 508 | ! create time_series netcdf file |
---|
| 509 | ! |
---|
| 510 | IMPLICIT NONE |
---|
| 511 | ! |
---|
| 512 | |
---|
| 513 | CHARACTER(len=80), INTENT(in) :: cl_filename |
---|
| 514 | CHARACTER(len=20), DIMENSION(:) :: cl_boxes |
---|
| 515 | ! |
---|
| 516 | LOGICAL :: clbon |
---|
| 517 | INTEGER :: i_file_id, i_dim_z_id, i_dim_box_id, & |
---|
| 518 | i_dim_len_id, i_dim_t_id |
---|
| 519 | INTEGER :: i_box_id, i_tim_id |
---|
| 520 | INTEGER :: i_nbox |
---|
| 521 | ! |
---|
| 522 | i_nbox = SIZE(cl_boxes,1) |
---|
| 523 | ! |
---|
| 524 | |
---|
| 525 | WRITE(*,*)' create_time_series',cl_filename |
---|
| 526 | CALL nchdlerr( nf90_create( cl_filename, nf90_clobber, i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 527 | ! |
---|
| 528 | CALL nchdlerr( nf90_def_dim( i_file_id, 'len', 20, i_dim_len_id ) ,__LINE__,__MYFILE__) |
---|
| 529 | CALL nchdlerr( nf90_def_dim( i_file_id, 'depth',i_dp, i_dim_z_id ) ,__LINE__,__MYFILE__) |
---|
| 530 | CALL nchdlerr( nf90_def_dim( i_file_id, 'box', i_nbox, i_dim_box_id ) ,__LINE__,__MYFILE__) |
---|
| 531 | CALL nchdlerr( nf90_def_dim( i_file_id, 'time', nf90_unlimited, i_dim_t_id ) ,__LINE__,__MYFILE__) |
---|
| 532 | |
---|
| 533 | |
---|
| 534 | WRITE(*,*)' In create_time_series_ntcdf' |
---|
| 535 | WRITE(*,*)' z,box,time: ',i_dim_z_id,i_dim_box_id, i_dim_t_id |
---|
| 536 | |
---|
| 537 | WRITE(*,*)' Definining box var ' |
---|
| 538 | CALL nchdlerr( nf90_def_var( i_file_id, 'box', nf90_char, & |
---|
| 539 | (/i_dim_len_id,i_dim_box_id/), i_box_id ),__LINE__,__MYFILE__) |
---|
| 540 | CALL nchdlerr( nf90_put_att( i_file_id, i_box_id, & |
---|
| 541 | 'long_name', 'Name of the box' ) ,__LINE__,__MYFILE__) |
---|
| 542 | |
---|
| 543 | WRITE(*,*)' Definining time var' |
---|
| 544 | CALL nchdlerr( nf90_def_var( i_file_id, 'time', nf90_int, & |
---|
| 545 | (/i_dim_t_id/),i_tim_id ) ,__LINE__,__MYFILE__) |
---|
| 546 | CALL nchdlerr( nf90_put_att( i_file_id, i_tim_id, 'standard_name','time') ,__LINE__,__MYFILE__) |
---|
| 547 | CALL nchdlerr( nf90_put_att( i_file_id, i_tim_id, 'long_name','time') ,__LINE__,__MYFILE__) |
---|
| 548 | CALL nchdlerr( nf90_put_att( i_file_id, i_tim_id, 'unit','days as %Y%m%d') ,__LINE__,__MYFILE__) |
---|
| 549 | CALL nchdlerr( nf90_put_att( i_file_id, i_tim_id, 'unit_long','days as %Y%m%d') ,__LINE__,__MYFILE__) |
---|
| 550 | ! |
---|
| 551 | CALL nchdlerr( nf90_enddef( i_file_id ) ,__LINE__,__MYFILE__) |
---|
| 552 | |
---|
| 553 | CALL nchdlerr( nf90_put_var( i_file_id, i_box_id, cl_boxes & |
---|
| 554 | ),__LINE__,__MYFILE__ ) |
---|
| 555 | ! |
---|
| 556 | CALL nchdlerr( nf90_close( i_file_id ),__LINE__,__MYFILE__ ) |
---|
| 557 | ! |
---|
| 558 | RETURN |
---|
| 559 | ! |
---|
| 560 | END SUBROUTINE create_time_series_netcdf_file |
---|
| 561 | |
---|
| 562 | |
---|
| 563 | !----------------------------------------------------------------------- |
---|
| 564 | SUBROUTINE variable_att |
---|
| 565 | !----------------------------------------------------------------------- |
---|
| 566 | ! |
---|
| 567 | ! ROUTINE variable_att |
---|
| 568 | ! ********************** |
---|
| 569 | ! |
---|
| 570 | ! Purpose : |
---|
| 571 | ! ------- |
---|
| 572 | ! set attributes for a given variable name |
---|
| 573 | ! |
---|
| 574 | ! Original : M. Balmaseda |
---|
| 575 | IMPLICIT NONE |
---|
| 576 | !----------------------------------------------------------------------- |
---|
| 577 | ! Different variables |
---|
| 578 | !----------------------------------------------------------------------- |
---|
| 579 | ! |
---|
| 580 | INTEGER:: ji,jj,jk |
---|
| 581 | REAL :: dx0 !nominal longitudinal resolution in deg |
---|
| 582 | REAL :: alat, alon,aux |
---|
| 583 | INTEGER,DIMENSION(:,:), ALLOCATABLE:: iaux |
---|
| 584 | |
---|
| 585 | SELECT CASE ( TRIM(cl_var) ) |
---|
| 586 | CASE ('sosstsst') |
---|
| 587 | i_nb_dims=2 |
---|
| 588 | cl_var_out='specified_sea_surface_temperature' |
---|
| 589 | cl_varname1='Sea_Surface_Temperature' |
---|
| 590 | cl_varname2='Sea Surface Temperature' |
---|
| 591 | cl_varunit1='C' |
---|
| 592 | cl_varunit2='degrees C' |
---|
| 593 | cl_code='159' |
---|
| 594 | cl_grid='t' |
---|
| 595 | CASE ('somxl010') |
---|
| 596 | i_nb_dims=2 |
---|
| 597 | cl_var_out='ocean_mixed_layer_thickness' |
---|
| 598 | cl_varname1='ocean_mixed_layer_thickness' |
---|
| 599 | cl_varname2='depth of the ocean mixed layer from the surface' |
---|
| 600 | cl_varunit1='m' |
---|
| 601 | cl_varunit2='meter' |
---|
| 602 | cl_code='148' |
---|
| 603 | cl_grid='t' |
---|
| 604 | CASE ('somixhgt') |
---|
| 605 | i_nb_dims=2 |
---|
| 606 | cl_var_out='turbocline_depth' |
---|
| 607 | cl_varname1='turbocline_depth' |
---|
| 608 | cl_varname2='turbocline depth' |
---|
| 609 | cl_varunit1='m' |
---|
| 610 | cl_varunit2='meter' |
---|
| 611 | cl_code='248' |
---|
| 612 | cl_grid='t' |
---|
| 613 | CASE ('somxlt05') |
---|
| 614 | i_nb_dims=2 |
---|
| 615 | cl_var_out='ocean_mixed_layer_depth' |
---|
| 616 | cl_varname1='ocean_mixed_layer_depth' |
---|
| 617 | cl_varname2='depth of the ocean mixed layer T 0.5 criteria' |
---|
| 618 | cl_varunit1='m' |
---|
| 619 | cl_varunit2='meter' |
---|
| 620 | cl_code='348' |
---|
| 621 | cl_grid='t' |
---|
| 622 | CASE ('sohtc300') |
---|
| 623 | i_nb_dims=2 |
---|
| 624 | cl_var_out='hc300' |
---|
| 625 | cl_varname1='300m_ocean_heat_content' |
---|
| 626 | cl_varname2='ocean heat content over the first 300m' |
---|
| 627 | cl_varunit1='J/m2' |
---|
| 628 | cl_varunit2='J/m2' |
---|
| 629 | cl_code='164' |
---|
| 630 | cl_grid='t' |
---|
| 631 | CASE ('sohtc700') |
---|
| 632 | i_nb_dims=2 |
---|
| 633 | cl_var_out='hc700' |
---|
| 634 | cl_varname1='700m_ocean_heat_content' |
---|
| 635 | cl_varname2='ocean heat content over the first 700m' |
---|
| 636 | cl_varunit1='J/m2' |
---|
| 637 | cl_varunit2='J/m2' |
---|
| 638 | cl_code='264' |
---|
| 639 | cl_grid='t' |
---|
| 640 | CASE ('sohtcbtm') |
---|
| 641 | i_nb_dims=2 |
---|
| 642 | cl_var_out='hcbtm' |
---|
| 643 | cl_varname1='Column_ocean_heat_content' |
---|
| 644 | cl_varname2='ocean heat content over the whole column' |
---|
| 645 | cl_varunit1='J/m2' |
---|
| 646 | cl_varunit2='J/m2' |
---|
| 647 | cl_code='364' |
---|
| 648 | cl_grid='t' |
---|
| 649 | CASE ('sosal300') |
---|
| 650 | i_nb_dims=2 |
---|
| 651 | cl_var_out='sal300' |
---|
| 652 | cl_varname1='300m_integrated salinity' |
---|
| 653 | cl_varname2='salinity integrated over the first 300m' |
---|
| 654 | cl_varunit1='psu*m' |
---|
| 655 | cl_varunit2='psu*m' |
---|
| 656 | cl_code='175' |
---|
| 657 | cl_grid='t' |
---|
| 658 | CASE ('sosal700') |
---|
| 659 | i_nb_dims=2 |
---|
| 660 | cl_var_out='sal700' |
---|
| 661 | cl_varname1='700m_integrated salinity' |
---|
| 662 | cl_varname2='salinity integrated over the first 700m' |
---|
| 663 | cl_varunit1='psu*m' |
---|
| 664 | cl_varunit2='psu*m' |
---|
| 665 | cl_code='275' |
---|
| 666 | cl_grid='t' |
---|
| 667 | CASE ('sosalbtm') |
---|
| 668 | i_nb_dims=2 |
---|
| 669 | cl_var_out='salbtm' |
---|
| 670 | cl_varname1='Column_integrate_salinity' |
---|
| 671 | cl_varname2='Integrated Salinity over the whole column' |
---|
| 672 | cl_varunit1='psu*m' |
---|
| 673 | cl_varunit2='psu*m' |
---|
| 674 | cl_code='375' |
---|
| 675 | cl_grid='t' |
---|
| 676 | CASE ('so20chgt') |
---|
| 677 | i_nb_dims=2 |
---|
| 678 | cl_var_out='d20_isotherm_depth' |
---|
| 679 | cl_varname1='depth' |
---|
| 680 | cl_varname2='depth of the D20 isotherm' |
---|
| 681 | cl_varunit1='m' |
---|
| 682 | cl_varunit2='meter' |
---|
| 683 | cl_code='163' |
---|
| 684 | cl_grid='t' |
---|
| 685 | CASE ('so28chgt') |
---|
| 686 | i_nb_dims=2 |
---|
| 687 | cl_var_out='d28_isotherm_depth' |
---|
| 688 | cl_varname1='28I_depth' |
---|
| 689 | cl_varname2='depth of the D28 isotherm' |
---|
| 690 | cl_varunit1='m' |
---|
| 691 | cl_varunit2='meter' |
---|
| 692 | cl_code='263' |
---|
| 693 | cl_grid='t' |
---|
| 694 | CASE ('so26chgt') |
---|
| 695 | i_nb_dims=2 |
---|
| 696 | cl_var_out='d26_isotherm_depth' |
---|
| 697 | cl_varname1='26I_depth' |
---|
| 698 | cl_varname2='depth of the D26 isotherm' |
---|
| 699 | cl_varunit1='m' |
---|
| 700 | cl_varunit2='meter' |
---|
| 701 | cl_code='463' |
---|
| 702 | cl_grid='t' |
---|
| 703 | CASE ('sothedep') |
---|
| 704 | i_nb_dims=2 |
---|
| 705 | cl_var_out='thermocline_depth' |
---|
| 706 | cl_varname1='thermocline_depth' |
---|
| 707 | cl_varname2='thermocline depth' |
---|
| 708 | cl_varunit1='m' |
---|
| 709 | cl_varunit2='meter' |
---|
| 710 | cl_code='363' |
---|
| 711 | cl_grid='t' |
---|
| 712 | CASE ('sossheig') |
---|
| 713 | i_nb_dims=2 |
---|
| 714 | cl_var_out='sea_surface_height_above_geoid' |
---|
| 715 | cl_varname1='sea_surface_height_above_geoid' |
---|
| 716 | cl_varname2='sea_surface_height_above_geoid' |
---|
| 717 | cl_varunit1='m' |
---|
| 718 | cl_varunit2='meter' |
---|
| 719 | cl_code='145' |
---|
| 720 | cl_grid='t' |
---|
| 721 | CASE ('sostheig') |
---|
| 722 | i_nb_dims=2 |
---|
| 723 | cl_var_out='steric_height' |
---|
| 724 | cl_varname1='steric_height' |
---|
| 725 | cl_varname2='steric_height' |
---|
| 726 | cl_varunit1='m' |
---|
| 727 | cl_varunit2='meter' |
---|
| 728 | cl_code='150' |
---|
| 729 | cl_grid='t' |
---|
| 730 | CASE ('sobpheig') |
---|
| 731 | i_nb_dims=2 |
---|
| 732 | cl_var_out='bottom_pressure_equivalent_height' |
---|
| 733 | cl_varname1='Bottom Pressure' |
---|
| 734 | cl_varname2='Bottom Pressure' |
---|
| 735 | cl_varunit1='m' |
---|
| 736 | cl_varunit2='meter' |
---|
| 737 | cl_code='149' |
---|
| 738 | cl_grid='t' |
---|
| 739 | CASE ('sohefldo') |
---|
| 740 | i_nb_dims=2 |
---|
| 741 | cl_var_out='specified_surface_heat_flux' |
---|
| 742 | cl_varname1='Net Downward Heat Flux' |
---|
| 743 | cl_varname2='Net Downward Heat Flux' |
---|
| 744 | cl_varunit1='W/m2' |
---|
| 745 | cl_varunit2='Watt_per_square_meter' |
---|
| 746 | cl_code='160' |
---|
| 747 | cl_grid='t' |
---|
| 748 | CASE ('sohefldp') |
---|
| 749 | i_nb_dims=2 |
---|
| 750 | cl_var_out='heat_flux_correction' |
---|
| 751 | cl_varname1='Surface_Heat_Flux_Damping' |
---|
| 752 | cl_varname2='Surface Heat Flux: Damping' |
---|
| 753 | cl_varunit1='W/m2' |
---|
| 754 | cl_varunit2='Watt_per_square_meter' |
---|
| 755 | cl_code='162' |
---|
| 756 | cl_grid='t' |
---|
| 757 | CASE ('soshfldo') |
---|
| 758 | i_nb_dims=2 |
---|
| 759 | cl_var_out='absorbed_solar_radiation' |
---|
| 760 | cl_varname1='Shortwave_Radiation' |
---|
| 761 | cl_varname2='Shortwave Radiation' |
---|
| 762 | cl_varunit1='W/m2' |
---|
| 763 | cl_varunit2='Watt_per_square_meter' |
---|
| 764 | cl_code='157' |
---|
| 765 | cl_grid='t' |
---|
| 766 | CASE ('sosalflx') |
---|
| 767 | i_nb_dims=2 |
---|
| 768 | cl_var_out='Surface_Salt_Flux' |
---|
| 769 | cl_varname1='Surface_Salt_Flux' |
---|
| 770 | cl_varname2='Surface Salt Flux' |
---|
| 771 | cl_varunit1='Kg/m2/s' |
---|
| 772 | cl_varunit2='Kg/m2/s' |
---|
| 773 | cl_code='260' |
---|
| 774 | cl_grid='t' |
---|
| 775 | CASE ('sosafldp') |
---|
| 776 | i_nb_dims=2 |
---|
| 777 | cl_var_out='Surface_salt_flux_damping' |
---|
| 778 | cl_varname1=cl_var_out |
---|
| 779 | cl_varname2='Surface salt flux: damping' |
---|
| 780 | cl_varunit1='Kg/m2/s' |
---|
| 781 | cl_varunit2='Kg/m2/s' |
---|
| 782 | cl_code='261' |
---|
| 783 | cl_grid='t' |
---|
| 784 | CASE ('sowaflup') |
---|
| 785 | i_nb_dims=2 |
---|
| 786 | cl_var_out='Net_Upward_Water_Flux' |
---|
| 787 | cl_varname1=cl_var_out |
---|
| 788 | cl_varname2=cl_var_out |
---|
| 789 | cl_varunit1='Kg/m2/s' |
---|
| 790 | cl_varunit2='Kg/m2/s' |
---|
| 791 | cl_code='258' |
---|
| 792 | cl_grid='t' |
---|
| 793 | CASE ('sowafldp') |
---|
| 794 | i_nb_dims=2 |
---|
| 795 | cl_var_out='Surface_Water_Flux_Damping' |
---|
| 796 | cl_varname1=cl_var_out |
---|
| 797 | cl_varname2=cl_var_out |
---|
| 798 | cl_varunit1='Kg/m2/s' |
---|
| 799 | cl_varunit2='Kg/m2/s' |
---|
| 800 | cl_code='262' |
---|
| 801 | cl_grid='t' |
---|
| 802 | CASE ('soicetem') |
---|
| 803 | i_nb_dims=2 |
---|
| 804 | cl_var_out='Ice_Surface_Temperature' |
---|
| 805 | cl_varname1=cl_var_out |
---|
| 806 | cl_varname2=cl_var_out |
---|
| 807 | cl_varunit1='K' |
---|
| 808 | cl_varunit2='Kelvin' |
---|
| 809 | cl_code='429' |
---|
| 810 | cl_grid='t' |
---|
| 811 | CASE ('soicealb') |
---|
| 812 | i_nb_dims=2 |
---|
| 813 | cl_var_out='Ice_Albedo' |
---|
| 814 | cl_varname1=cl_var_out |
---|
| 815 | cl_varname2=cl_var_out |
---|
| 816 | cl_varunit1='dl' |
---|
| 817 | cl_varunit2='dimensionless' |
---|
| 818 | cl_code='430' |
---|
| 819 | cl_grid='t' |
---|
| 820 | CASE ('soicecov') |
---|
| 821 | i_nb_dims=2 |
---|
| 822 | cl_var_out='Ice_Fraction' |
---|
| 823 | cl_varname1=cl_var_out |
---|
| 824 | cl_varname2=cl_var_out |
---|
| 825 | cl_varunit1='dl' |
---|
| 826 | cl_varunit2='dimensionless' |
---|
| 827 | cl_code='431' |
---|
| 828 | cl_grid='t' |
---|
| 829 | CASE ('votemper') |
---|
| 830 | i_nb_dims=3 |
---|
| 831 | cl_var_out='sea_water_potential_temperature' |
---|
| 832 | cl_varname1='sea_water_potential_temperature' |
---|
| 833 | cl_varname2='Potential temperature ref to surface C' |
---|
| 834 | cl_varunit1='C' |
---|
| 835 | cl_varunit2='degree_Celcius' |
---|
| 836 | cl_code='129' |
---|
| 837 | cl_grid='t' |
---|
| 838 | CASE ('vosaline') |
---|
| 839 | i_nb_dims=3 |
---|
| 840 | cl_var_out='sea_water_salinity' |
---|
| 841 | cl_varname1='sea_water_salinity' |
---|
| 842 | cl_varname2='sea water salinity' |
---|
| 843 | cl_varunit1='PSU' |
---|
| 844 | cl_varunit2='practical_salinity_scale' |
---|
| 845 | cl_code='130' |
---|
| 846 | cl_grid='t' |
---|
| 847 | CASE ('vosigmat') |
---|
| 848 | i_nb_dims=3 |
---|
| 849 | cl_var_out='sigmat' |
---|
| 850 | cl_varname1='sigmat' |
---|
| 851 | cl_varname2='sigmat' |
---|
| 852 | cl_varunit1='C' |
---|
| 853 | cl_varunit2='NA' |
---|
| 854 | cl_code='138' |
---|
| 855 | cl_grid='t' |
---|
| 856 | CASE ('vottrdmp') |
---|
| 857 | i_nb_dims=3 |
---|
| 858 | cl_var_out='Damping_T_3D' |
---|
| 859 | cl_varname1='Damping_T_3D' |
---|
| 860 | cl_varname2='Damping T 3D' |
---|
| 861 | cl_varunit1='C/s' |
---|
| 862 | cl_varunit2='degree_Celsius/second' |
---|
| 863 | cl_code='201' |
---|
| 864 | cl_grid='t' |
---|
| 865 | CASE ('vostrdmp') |
---|
| 866 | i_nb_dims=3 |
---|
| 867 | cl_var_out='Damping_S_3D' |
---|
| 868 | cl_varname1='Damping_S_3D' |
---|
| 869 | cl_varname2='Damping S_3D' |
---|
| 870 | cl_varunit1='psu/s' |
---|
| 871 | cl_varunit2='psu/second' |
---|
| 872 | cl_code='202' |
---|
| 873 | cl_grid='t' |
---|
| 874 | CASE ('votbiasd') |
---|
| 875 | i_nb_dims=3 |
---|
| 876 | cl_var_out='Bias_T_direct' |
---|
| 877 | cl_varname1='Bias_T_direct' |
---|
| 878 | cl_varname2='Bias_T_direct' |
---|
| 879 | cl_varunit1='C' |
---|
| 880 | cl_varunit2='degree_Celsius' |
---|
| 881 | cl_code='203' |
---|
| 882 | cl_grid='t' |
---|
| 883 | CASE ('vosbiasd') |
---|
| 884 | i_nb_dims=3 |
---|
| 885 | cl_var_out='Bias_S_direct' |
---|
| 886 | cl_varname1='Bias_S_direct' |
---|
| 887 | cl_varname2='Bias_S_direct' |
---|
| 888 | cl_varunit1='psu' |
---|
| 889 | cl_varunit2='psu' |
---|
| 890 | cl_code='204' |
---|
| 891 | cl_grid='t' |
---|
| 892 | CASE ('votbiasp') |
---|
| 893 | i_nb_dims=3 |
---|
| 894 | cl_var_out='Bias_T_pressure' |
---|
| 895 | cl_varname1='Bias_T_pressure' |
---|
| 896 | cl_varname2='Bias_T_pressure' |
---|
| 897 | cl_varunit1='C' |
---|
| 898 | cl_varunit2='degree_Celsius' |
---|
| 899 | cl_code='205' |
---|
| 900 | cl_grid='t' |
---|
| 901 | CASE ('vosbiasp') |
---|
| 902 | i_nb_dims=3 |
---|
| 903 | cl_var_out='Bias_S_pressure' |
---|
| 904 | cl_varname1='Bias_S_pressure' |
---|
| 905 | cl_varname2='Bias_S_pressure' |
---|
| 906 | cl_varunit1='psu' |
---|
| 907 | cl_varunit2='psu' |
---|
| 908 | cl_code='206' |
---|
| 909 | cl_grid='t' |
---|
| 910 | CASE ('vorbiasp') |
---|
| 911 | i_nb_dims=3 |
---|
| 912 | cl_var_out='Bias_rho_pressure' |
---|
| 913 | cl_varname1='Bias_rho_pressure' |
---|
| 914 | cl_varname2='Bias_rho_pressure' |
---|
| 915 | cl_varunit1='kg/m3/s' |
---|
| 916 | cl_varunit2='kg/m3/s' |
---|
| 917 | cl_code='207' |
---|
| 918 | cl_grid='t' |
---|
| 919 | CASE ('sozotaux') |
---|
| 920 | i_nb_dims=2 |
---|
| 921 | cl_var_out='surface_downward_eastward_stress' |
---|
| 922 | cl_varname1='Wind_Stress_along_i-axis' |
---|
| 923 | cl_varname2=cl_var_out |
---|
| 924 | cl_varunit1='N/m2' |
---|
| 925 | cl_varunit2='N/m2' |
---|
| 926 | cl_code='153' |
---|
| 927 | cl_grid='u' |
---|
| 928 | if (sec .eq. 'v') then |
---|
| 929 | cl_varname2='taux*x*z' |
---|
| 930 | cl_varunit1='Sv' |
---|
| 931 | cl_varunit2='Sv' |
---|
| 932 | endif |
---|
| 933 | if (sec .eq. 'u') then |
---|
| 934 | cl_varname2='taux*y*z' |
---|
| 935 | cl_varunit1='Sv' |
---|
| 936 | cl_varunit2='Sv' |
---|
| 937 | endif |
---|
| 938 | CASE ('vozocrtx') |
---|
| 939 | i_nb_dims=3 |
---|
| 940 | cl_var_out='sea_water_x_velocity' |
---|
| 941 | cl_varname1='sea_water_x_velocity' |
---|
| 942 | cl_varname2='U zonal current m/s' |
---|
| 943 | cl_varunit1='m/s' |
---|
| 944 | cl_varunit2='meter_per_second' |
---|
| 945 | cl_code='131' |
---|
| 946 | cl_grid='u' |
---|
| 947 | if (sec .eq. 'u') then |
---|
| 948 | cl_var_out='zonal_transport' |
---|
| 949 | cl_varname1='zonal_transport' |
---|
| 950 | cl_varname2='zonal_transport' |
---|
| 951 | cl_varunit1='Sv' |
---|
| 952 | cl_varunit2='Sv' |
---|
| 953 | endif |
---|
| 954 | CASE ('vozout') |
---|
| 955 | i_nb_dims=3 |
---|
| 956 | cl_var_out='UT' |
---|
| 957 | cl_varname1='UT' |
---|
| 958 | cl_varname2='UT' |
---|
| 959 | cl_varunit1='K*m/s' |
---|
| 960 | cl_varunit2='K*m/s' |
---|
| 961 | cl_code='169' |
---|
| 962 | cl_grid='t' |
---|
| 963 | if (sec .eq. 'u') then |
---|
| 964 | cl_var_out='zonal_H_transport' |
---|
| 965 | cl_varname1='zonal_H_transport' |
---|
| 966 | cl_varname2='zonal_H_transport' |
---|
| 967 | cl_varunit1='PW' |
---|
| 968 | cl_varunit2='PW' |
---|
| 969 | endif |
---|
| 970 | CASE ('vozous') |
---|
| 971 | i_nb_dims=3 |
---|
| 972 | cl_var_out='US' |
---|
| 973 | cl_varname1='US' |
---|
| 974 | cl_varname2='US' |
---|
| 975 | cl_varunit1='psu*m/s' |
---|
| 976 | cl_varunit2='psu*m/s' |
---|
| 977 | cl_code='171' |
---|
| 978 | cl_grid='t' |
---|
| 979 | if (sec .eq. 'u') then |
---|
| 980 | cl_var_out='zonal_S_transport' |
---|
| 981 | cl_varname1='zonal_S_transport' |
---|
| 982 | cl_varname2='zonal_S_transport' |
---|
| 983 | cl_varunit1='kT/s' |
---|
| 984 | cl_varunit2='kT/s' |
---|
| 985 | endif |
---|
| 986 | CASE ('vomecrty') |
---|
| 987 | i_nb_dims=3 |
---|
| 988 | cl_var_out='sea_water_y_velocity' |
---|
| 989 | cl_varname1='sea_water_y_velocity' |
---|
| 990 | cl_varname2='V meridional current m/s' |
---|
| 991 | cl_varunit1='m/s' |
---|
| 992 | cl_varunit2='meter_per_second' |
---|
| 993 | cl_code='132' |
---|
| 994 | cl_grid='v' |
---|
| 995 | if (sec .eq. 'v') then |
---|
| 996 | cl_var_out='meridional_transport' |
---|
| 997 | cl_varname1='meridional_transport' |
---|
| 998 | cl_varname2='meridional_transport' |
---|
| 999 | cl_varunit1='Sv' |
---|
| 1000 | cl_varunit2='Sv' |
---|
| 1001 | endif |
---|
| 1002 | CASE ('sometauy') |
---|
| 1003 | i_nb_dims=2 |
---|
| 1004 | cl_var_out='surface_downward_northward_stress' |
---|
| 1005 | cl_varname1='Wind_Stress_along_j-axis' |
---|
| 1006 | cl_varname2=cl_var_out |
---|
| 1007 | cl_varunit1='N/m2' |
---|
| 1008 | cl_varunit2='N/m2' |
---|
| 1009 | cl_code='154' |
---|
| 1010 | cl_grid='v' |
---|
| 1011 | if (sec .eq. 'v') then |
---|
| 1012 | cl_varname2='tauy*x*z' |
---|
| 1013 | cl_varunit1='Sv' |
---|
| 1014 | cl_varunit2='Sv' |
---|
| 1015 | endif |
---|
| 1016 | if (sec .eq. 'u') then |
---|
| 1017 | cl_varname2='tauy*y*z' |
---|
| 1018 | cl_varunit1='Sv' |
---|
| 1019 | cl_varunit2='Sv' |
---|
| 1020 | endif |
---|
| 1021 | CASE ('vomevt') |
---|
| 1022 | i_nb_dims=3 |
---|
| 1023 | cl_var_out='VT' |
---|
| 1024 | cl_varname1='VT' |
---|
| 1025 | cl_varname2='VT' |
---|
| 1026 | cl_varunit1='K*m/s' |
---|
| 1027 | cl_varunit2='K*m/s' |
---|
| 1028 | cl_code='170' |
---|
| 1029 | cl_grid='t' |
---|
| 1030 | if (sec .eq. 'v') then |
---|
| 1031 | cl_var_out='meridional_H_transport' |
---|
| 1032 | cl_varname1='meridional_H_transport' |
---|
| 1033 | cl_varname2='meridional_H_transport' |
---|
| 1034 | cl_varunit1='PW' |
---|
| 1035 | cl_varunit2='PW' |
---|
| 1036 | endif |
---|
| 1037 | CASE ('vomevs') |
---|
| 1038 | i_nb_dims=3 |
---|
| 1039 | cl_var_out='VS' |
---|
| 1040 | cl_varname1='VS' |
---|
| 1041 | cl_varname2='VS' |
---|
| 1042 | cl_varunit1='psu*m/s' |
---|
| 1043 | cl_varunit2='psu*m/s' |
---|
| 1044 | cl_code='172' |
---|
| 1045 | cl_grid='t' |
---|
| 1046 | if (sec .eq. 'v') then |
---|
| 1047 | cl_var_out='meridional_S_transport' |
---|
| 1048 | cl_varname1='meridional_S_transport' |
---|
| 1049 | cl_varname2='meridional_S_transport' |
---|
| 1050 | cl_varunit1='kT/s' |
---|
| 1051 | cl_varunit2='kT/s' |
---|
| 1052 | endif |
---|
| 1053 | CASE ('vovecrtz') |
---|
| 1054 | i_nb_dims=3 |
---|
| 1055 | cl_var_out='upward_sea_water_velocity' |
---|
| 1056 | cl_varname1='upward_sea_water_velocity' |
---|
| 1057 | cl_varname2='W vertical current m/s' |
---|
| 1058 | cl_varunit1='m/s' |
---|
| 1059 | cl_varunit2='meter_per_second' |
---|
| 1060 | cl_code='133' |
---|
| 1061 | cl_grid='f' |
---|
| 1062 | CASE ('votkeavm') |
---|
| 1063 | i_nb_dims=3 |
---|
| 1064 | cl_var_out='vertical_eddy_viscosity' |
---|
| 1065 | cl_varname1='vertical_eddy_viscosity' |
---|
| 1066 | cl_varname2='vertical eddy viscosity' |
---|
| 1067 | cl_varunit1='m2/s' |
---|
| 1068 | cl_varunit2='square_meter_per_second' |
---|
| 1069 | cl_code='135' |
---|
| 1070 | cl_grid='f' |
---|
| 1071 | CASE ('votkeavt') |
---|
| 1072 | i_nb_dims=3 |
---|
| 1073 | cl_var_out='vertical_eddy_diffusivity' |
---|
| 1074 | cl_varname1='vertical_eddy_diffusivity' |
---|
| 1075 | cl_varname2='vertical eddy diffusivity' |
---|
| 1076 | cl_varunit1='m2/s' |
---|
| 1077 | cl_varunit2='square_meter_per_second' |
---|
| 1078 | cl_code='136' |
---|
| 1079 | cl_grid='f' |
---|
| 1080 | CASE ('votkeevm') |
---|
| 1081 | i_nb_dims=3 |
---|
| 1082 | cl_var_out='enhanced_vertical_eddy_viscosity' |
---|
| 1083 | cl_varname1='enhanced_vertical_eddy_viscosity' |
---|
| 1084 | cl_varname2='enhanced vertical eddy viscosity' |
---|
| 1085 | cl_varunit1='m2/s' |
---|
| 1086 | cl_varunit2='square_meter_per_second' |
---|
| 1087 | cl_code='235' |
---|
| 1088 | cl_grid='f' |
---|
| 1089 | CASE ('votkeevd') |
---|
| 1090 | i_nb_dims=3 |
---|
| 1091 | cl_var_out='enhanced_vertical_eddy_diffusivity' |
---|
| 1092 | cl_varname1='enhanced_vertical_eddy_diffusivity' |
---|
| 1093 | cl_varname2='enhanced vertical eddy diffusivity' |
---|
| 1094 | cl_varunit1='m2/s' |
---|
| 1095 | cl_varunit2='square_meter_per_second' |
---|
| 1096 | cl_code='236' |
---|
| 1097 | cl_grid='f' |
---|
| 1098 | CASE ('voddmavs') |
---|
| 1099 | i_nb_dims=3 |
---|
| 1100 | cl_var_out='salt_vertical_eddy_diffusivity' |
---|
| 1101 | cl_varname1='salt_vertical_eddy_diffusivity' |
---|
| 1102 | cl_varname2='salt vertical eddy diffusivity' |
---|
| 1103 | cl_varunit1='m2/s' |
---|
| 1104 | cl_varunit2='square_meter_per_second' |
---|
| 1105 | cl_code='237' |
---|
| 1106 | cl_grid='f' |
---|
| 1107 | CASE ('bckint') |
---|
| 1108 | i_nb_dims=3 |
---|
| 1109 | cl_var_out='assim_incr_temperature' |
---|
| 1110 | cl_varname1='assim_incr_temperature' |
---|
| 1111 | cl_varname2='assim_incr_temperature' |
---|
| 1112 | cl_varunit1='K/s' |
---|
| 1113 | cl_varunit2='Kelvin_per_second' |
---|
| 1114 | cl_code='178' |
---|
| 1115 | cl_grid='t' |
---|
| 1116 | CASE ('bckins') |
---|
| 1117 | i_nb_dims=3 |
---|
| 1118 | cl_var_out='assim_incr_salinity' |
---|
| 1119 | cl_varname1='assim_incr_salinity' |
---|
| 1120 | cl_varname2='assim_incr_salinity' |
---|
| 1121 | cl_varunit1='psu/s' |
---|
| 1122 | cl_varunit2='psu_per_second' |
---|
| 1123 | cl_code='184' |
---|
| 1124 | cl_grid='t' |
---|
| 1125 | CASE ('bckinu') |
---|
| 1126 | i_nb_dims=3 |
---|
| 1127 | cl_var_out='assim_incr_uvel' |
---|
| 1128 | cl_varname1='assim_incr_uvel' |
---|
| 1129 | cl_varname2='assim_incr_uvel' |
---|
| 1130 | cl_varunit1='m/s2' |
---|
| 1131 | cl_varunit2='meter_per_square_second' |
---|
| 1132 | cl_code='179' |
---|
| 1133 | cl_grid='u' |
---|
| 1134 | CASE ('bckinv') |
---|
| 1135 | i_nb_dims=3 |
---|
| 1136 | cl_var_out='assim_incr_vvel' |
---|
| 1137 | cl_varname1='assim_incr_vvel' |
---|
| 1138 | cl_varname2='assim_incr_vvel' |
---|
| 1139 | cl_varunit1='m/s2' |
---|
| 1140 | cl_varunit2='meter_per_square_second' |
---|
| 1141 | cl_code='180' |
---|
| 1142 | cl_grid='v' |
---|
| 1143 | CASE ('bckineta') |
---|
| 1144 | i_nb_dims=2 |
---|
| 1145 | cl_var_out='assim_incr_eta' |
---|
| 1146 | cl_varname1='assim_incr_eta' |
---|
| 1147 | cl_varname2='assim_incr_eta' |
---|
| 1148 | cl_varunit1='m/s' |
---|
| 1149 | cl_varunit2='meter_per_second' |
---|
| 1150 | cl_code='181' |
---|
| 1151 | cl_grid='t' |
---|
| 1152 | CASE ('vozoeivu') |
---|
| 1153 | i_nb_dims=3 |
---|
| 1154 | cl_var_out='vozoeivu' |
---|
| 1155 | cl_varname1='vozoeivu' |
---|
| 1156 | cl_varname2='eddy U velocity m/s' |
---|
| 1157 | cl_varunit1='m/s' |
---|
| 1158 | cl_varunit2='meter_per_second' |
---|
| 1159 | cl_code='231' |
---|
| 1160 | CASE ('vomeeivv') |
---|
| 1161 | i_nb_dims=3 |
---|
| 1162 | cl_var_out='vomeeivv' |
---|
| 1163 | cl_varname1='vomeeivv' |
---|
| 1164 | cl_varname2='eddy V velocity m/s' |
---|
| 1165 | cl_varunit1='m/s' |
---|
| 1166 | cl_varunit2='meter_per_second' |
---|
| 1167 | cl_code='232' |
---|
| 1168 | CASE default |
---|
| 1169 | WRITE(*,*)'Variables not defined' |
---|
| 1170 | CALL ABORT |
---|
| 1171 | END SELECT |
---|
| 1172 | cl_var_out = TRIM(cl_var_out) |
---|
| 1173 | cl_varname1 = TRIM(cl_varname1) |
---|
| 1174 | cl_varname2 = TRIM(cl_varname2) |
---|
| 1175 | cl_varunit1 = TRIM(cl_varunit1) |
---|
| 1176 | cl_varunit2 = TRIM(cl_varunit2) |
---|
| 1177 | cl_code = TRIM(cl_code) |
---|
| 1178 | cl_grid = TRIM(cl_grid) |
---|
| 1179 | |
---|
| 1180 | cl_filename_out = TRIM(cl_expnam) // TRIM(cl_date) // '_' // TRIM(cl_code) //sec//'mona.nc' |
---|
| 1181 | cl_filename2_out = TRIM(cl_expnam) // TRIM(cl_date) // '_' // TRIM(cl_code) // 'xy' //sec//'mona.nc' |
---|
| 1182 | ! IF ( i_nb_dims .EQ. 2 ) THEN |
---|
| 1183 | ! i_dp=1 |
---|
| 1184 | ! ELSE |
---|
| 1185 | ! i_dp=jpk |
---|
| 1186 | ! ENDIF |
---|
| 1187 | WRITE(*,*)'Variable Attributes: ' |
---|
| 1188 | WRITE(*,*)' cl_var_out = ',cl_var_out |
---|
| 1189 | ! WRITE(*,*)' i_dp = ',i_dp |
---|
| 1190 | WRITE(*,*)' cl_grid = ',cl_grid |
---|
| 1191 | WRITE(*,*)' cl_code = ',cl_code |
---|
| 1192 | WRITE(*,*)' i_nb_dims = ',i_nb_dims |
---|
| 1193 | WRITE(*,*)'------------------------------------ ' |
---|
| 1194 | |
---|
| 1195 | RETURN |
---|
| 1196 | END SUBROUTINE variable_att |
---|
| 1197 | !----------------------------------------------------------------------- |
---|
| 1198 | SUBROUTINE obs_variable_att(cl_type) |
---|
| 1199 | !----------------------------------------------------------------------- |
---|
| 1200 | ! |
---|
| 1201 | ! ROUTINE obs_variable_att |
---|
| 1202 | ! **************************** |
---|
| 1203 | ! |
---|
| 1204 | ! Purpose : |
---|
| 1205 | ! ------- |
---|
| 1206 | ! set attributes for a given variable name (feedback version) |
---|
| 1207 | ! |
---|
| 1208 | ! Original : K. Mogensen |
---|
| 1209 | IMPLICIT NONE |
---|
| 1210 | !----------------------------------------------------------------------- |
---|
| 1211 | ! Different variables |
---|
| 1212 | !----------------------------------------------------------------------- |
---|
| 1213 | CHARACTER(len=*) :: cl_type |
---|
| 1214 | ! |
---|
| 1215 | SELECT CASE ( TRIM(cl_var) ) |
---|
| 1216 | CASE ('sossheig') |
---|
| 1217 | i_nb_dims=2 |
---|
| 1218 | cl_var_out='sea_surface_height_above_geoid' |
---|
| 1219 | cl_varname1='sea_surface_height_above_geoid' |
---|
| 1220 | cl_varname2='sea_surface_height_above_geoid' |
---|
| 1221 | cl_varunit1='m' |
---|
| 1222 | cl_varunit2='meter' |
---|
| 1223 | cl_code='145' |
---|
| 1224 | CASE ('sosstsst') |
---|
| 1225 | i_nb_dims=2 |
---|
| 1226 | cl_var_out='sea_surface_temperature' |
---|
| 1227 | cl_varname1='sea_surface_temperature' |
---|
| 1228 | cl_varname2='sea_surface_temperature' |
---|
| 1229 | cl_varunit1='K' |
---|
| 1230 | cl_varunit2='Kelvin' |
---|
| 1231 | cl_code='159' |
---|
| 1232 | CASE ('votemper') |
---|
| 1233 | i_nb_dims=3 |
---|
| 1234 | cl_var_out='sea_water_potential_temperature' |
---|
| 1235 | cl_varname1='sea_water_potential_temperature' |
---|
| 1236 | cl_varname2='Potential temperature ref to surface C' |
---|
| 1237 | cl_varunit1='C' |
---|
| 1238 | cl_varunit2='degree_Celcius' |
---|
| 1239 | cl_code='129' |
---|
| 1240 | CASE ('vosaline') |
---|
| 1241 | i_nb_dims=3 |
---|
| 1242 | cl_var_out='sea_water_salinity' |
---|
| 1243 | cl_varname1='sea_water_salinity' |
---|
| 1244 | cl_varname2='sea water salinity' |
---|
| 1245 | cl_varunit1='PSU' |
---|
| 1246 | cl_varunit2='practical_salinity_scale' |
---|
| 1247 | cl_code='130' |
---|
| 1248 | CASE ('vozocrtx') |
---|
| 1249 | i_nb_dims=3 |
---|
| 1250 | cl_var_out='sea_water_x_velocity' |
---|
| 1251 | cl_varname1='sea_water_x_velocity' |
---|
| 1252 | cl_varname2='U zonal current m/s' |
---|
| 1253 | cl_varunit1='m/s' |
---|
| 1254 | cl_varunit2='meter_per_second' |
---|
| 1255 | cl_code='131' |
---|
| 1256 | CASE ('vomecrty') |
---|
| 1257 | i_nb_dims=3 |
---|
| 1258 | cl_var_out='sea_water_y_velocity' |
---|
| 1259 | cl_varname1='sea_water_y_velocity' |
---|
| 1260 | cl_varname2='V meridional current m/s' |
---|
| 1261 | cl_varunit1='m/s' |
---|
| 1262 | cl_varunit2='meter_per_second' |
---|
| 1263 | cl_code='132' |
---|
| 1264 | CASE default |
---|
| 1265 | WRITE(*,*)'Variables not defined' |
---|
| 1266 | CALL ABORT |
---|
| 1267 | END SELECT |
---|
| 1268 | cl_var_out = TRIM(cl_var_out) |
---|
| 1269 | cl_varname1 = TRIM(cl_varname1) |
---|
| 1270 | cl_varname2 = TRIM(cl_varname2) |
---|
| 1271 | cl_varunit1 = TRIM(cl_varunit1) |
---|
| 1272 | cl_varunit2 = TRIM(cl_varunit2) |
---|
| 1273 | cl_code = TRIM(cl_code) |
---|
| 1274 | cl_filename_out = TRIM(cl_expnam) // TRIM(cl_date) // '_' // & |
---|
| 1275 | & TRIM(cl_code) // '_'//TRIM(cl_type)//'_'//'fbmona.nc' |
---|
| 1276 | cl_filename2_out = TRIM(cl_expnam) // TRIM(cl_date) // '_' // & |
---|
| 1277 | & TRIM(cl_code) // '_'//TRIM(cl_type)//'_'// 'xy' //'_'//'fbmona.nc' |
---|
| 1278 | |
---|
| 1279 | RETURN |
---|
| 1280 | END SUBROUTINE obs_variable_att |
---|
| 1281 | |
---|
| 1282 | |
---|
| 1283 | END MODULE omonainfo |
---|