- Timestamp:
- 2018-10-29T15:20:26+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/TOOLS/SIREN/src/create_coord.f90
r10248 r10251 24 24 !> @endcode 25 25 !> 26 !> @note27 !> you could find a template of the namelist in templates directory.28 !>29 26 !> create_coord.nam comprise 6 namelists:<br/> 30 27 !> - logger namelist (namlog) … … 42 39 !> - cn_logfile : log filename 43 40 !> - cn_verbosity : verbosity ('trace','debug','info', 44 !> 'warning','error','fatal' ,'none')41 !> 'warning','error','fatal') 45 42 !> - in_maxerror : maximum number of error allowed 46 43 !> … … 57 54 !> - cn_varinfo : list of variable and extra information about request(s) 58 55 !> to be used.<br/> 59 !> each elements of *cn_varinfo* is a string character 60 !> (separated by ',').<br/> 56 !> each elements of *cn_varinfo* is a string character.<br/> 61 57 !> it is composed of the variable name follow by ':', 62 58 !> then request(s) to be used on this variable.<br/> 63 59 !> request could be: 64 !> - int = interpolation method65 !> - ext = extrapolation method66 !> - f lt = filter method60 !> - interpolation method 61 !> - extrapolation method 62 !> - filter method 67 63 !> 68 64 !> requests must be separated by ';' .<br/> … … 72 68 !> @ref extrap and @ref filter modules.<br/> 73 69 !> 74 !> Example: 'votemper: int=linear; flt=hann(2,3); ext=dist_weight',75 !> 'vosaline: int=cubic'<br/>70 !> Example: 'votemper: linear; hann(2,3); dist_weight', 71 !> 'vosaline: cubic'<br/> 76 72 !> @note 77 73 !> If you do not specify a method which is required, … … 94 90 !> 95 91 !> * _output namelist (namout)_: 96 !> - cn_fileout : output coordinate file name92 !> - cn_fileout : output coordinate file 97 93 !> 98 94 !> @author J.Paul … … 156 152 TYPE(TFILE) :: tl_fileout 157 153 154 ! check 155 ! INTEGER(i4) :: il_imin0 156 ! INTEGER(i4) :: il_imax0 157 ! INTEGER(i4) :: il_jmin0 158 ! INTEGER(i4) :: il_jmax0 159 ! INTEGER(i4) , DIMENSION(2,2) :: il_ind2 160 ! TYPE(TMPP) :: tl_mppout 161 158 162 ! loop indices 159 163 INTEGER(i4) :: ji … … 161 165 162 166 ! namelist variable 163 ! namlog164 167 CHARACTER(LEN=lc) :: cn_logfile = 'create_coord.log' 165 168 CHARACTER(LEN=lc) :: cn_verbosity = 'warning' 166 169 INTEGER(i4) :: in_maxerror = 5 167 170 168 ! namcfg169 CHARACTER(LEN=lc) :: cn_varcfg = '../cfg/variable.cfg'170 171 ! namcrs172 171 CHARACTER(LEN=lc) :: cn_coord0 = '' 173 172 INTEGER(i4) :: in_perio0 = -1 174 173 175 ! namvar 174 CHARACTER(LEN=lc) :: cn_varcfg = '../cfg/variable.cfg' 175 176 176 CHARACTER(LEN=lc), DIMENSION(ip_maxvar) :: cn_varinfo = '' 177 177 178 !namnst179 178 INTEGER(i4) :: in_imin0 = 0 180 179 INTEGER(i4) :: in_imax0 = 0 … … 184 183 INTEGER(i4) :: in_rhoj = 1 185 184 186 !namout187 185 CHARACTER(LEN=lc) :: cn_fileout= 'coord_fine.nc' 188 186 !------------------------------------------------------------------- … … 307 305 308 306 il_offset(:,:,:)=create_coord_get_offset(il_rho(:)) 307 309 308 ENDIF 310 309 … … 349 348 CALL dom_del_extra( tl_var(ji), tl_dom, il_rho(:), .true. ) 350 349 350 ! do not add ghost cell. 351 ! ghost cell already replace by value for coordinates 352 ! CALL grid_add_ghost(tl_var(ji),tl_dom%i_ghost(:,:)) 353 351 354 ! filter 352 355 CALL filter_fill_value(tl_var(ji)) … … 372 375 373 376 ! add variables 374 DO ji= il_nvar,1,-1377 DO ji=1,il_nvar 375 378 CALL file_add_var(tl_fileout, tl_var(ji)) 376 CALL var_clean(tl_var(ji))377 379 ENDDO 380 381 ! recompute some attribute 378 382 379 383 ! add some attribute … … 436 440 437 441 CALL file_clean(tl_fileout) 442 443 ! ! check domain 444 ! tl_coord0=mpp_init( file_init(TRIM(cn_coord0)), id_perio=in_perio0) 445 ! tl_mppout=mpp_init( file_init(TRIM(cn_fileout)) ) 446 ! CALL grid_get_info(tl_coord0) 447 ! CALL iom_mpp_open(tl_mppout) 448 ! 449 ! il_ind2(:,:)=grid_get_coarse_index( tl_coord0, tl_mppout, & 450 ! & id_rho=il_rho(:) ) 451 ! 452 ! il_imin0=il_ind2(1,1) ; il_imax0=il_ind2(1,2) 453 ! il_jmin0=il_ind2(2,1) ; il_jmax0=il_ind2(2,2) 454 ! 455 ! IF( il_imin0 /= in_imin0 .OR. & 456 ! & il_imax0 /= in_imax0 .OR. & 457 ! & il_jmin0 /= in_jmin0 .OR. & 458 ! & il_jmax0 /= in_jmax0 )THEN 459 ! CALL logger_debug("CREATE COORD: output indices ("//& 460 ! & TRIM(fct_str(il_imin0))//","//& 461 ! & TRIM(fct_str(il_imax0))//") ("//& 462 ! & TRIM(fct_str(il_jmin0))//","//& 463 ! & TRIM(fct_str(il_jmax0))//")" ) 464 ! CALL logger_debug("CREATE COORD: input indices ("//& 465 ! & TRIM(fct_str(in_imin0))//","//& 466 ! & TRIM(fct_str(in_imax0))//") ("//& 467 ! & TRIM(fct_str(in_jmin0))//","//& 468 ! & TRIM(fct_str(in_jmax0))//")" ) 469 ! CALL logger_fatal("CREATE COORD: output domain not confrom "//& 470 ! & "with input indices") 471 ! ENDIF 472 ! 473 ! CALL iom_mpp_close(tl_coord0) 474 ! CALL iom_mpp_close(tl_mppout) 438 475 439 476 ! close log file … … 502 539 !> @param[in] id_iext number of points to be extrapolated in i-direction 503 540 !> @param[in] id_jext number of points to be extrapolated in j-direction 504 !>505 !> @todo check if mask is really needed506 541 !------------------------------------------------------------------- 507 542 SUBROUTINE create_coord_interp( td_var, & … … 591 626 592 627 ! extrapolate variable 593 CALL extrap_fill_value( td_var )628 CALL extrap_fill_value( td_var, id_iext=il_iext, id_jext=il_jext ) 594 629 595 630 ! interpolate variable
Note: See TracChangeset
for help on using the changeset viewer.