Changeset 10248 for branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/TOOLS/SIREN/src/create_boundary.f90
- Timestamp:
- 2018-10-29T11:44:36+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/TOOLS/SIREN/src/create_boundary.f90
r5037 r10248 23 23 !> ./SIREN/bin/create_boundary create_boundary.nam 24 24 !> @endcode 25 !> 25 !> <br/> 26 !> \image html boundary_NEATL36_70.png 27 !> \image latex boundary_NEATL36_70.png 28 !> 29 !> @note 30 !> you could find a template of the namelist in templates directory. 31 !> 26 32 !> create_boundary.nam comprise 9 namelists:<br/> 27 33 !> - logger namelist (namlog) … … 42 48 !> - cn_logfile : log filename 43 49 !> - cn_verbosity : verbosity ('trace','debug','info', 44 !> 'warning','error','fatal' )50 !> 'warning','error','fatal','none') 45 51 !> - in_maxerror : maximum number of error allowed 46 52 !> … … 79 85 !> * _variable namelist (namvar)_:<br/> 80 86 !> - cn_varinfo : list of variable and extra information about request(s) 81 !> to be used.<br/>87 !> to be used (separated by ',').<br/> 82 88 !> each elements of *cn_varinfo* is a string character.<br/> 83 89 !> it is composed of the variable name follow by ':', 84 90 !> then request(s) to be used on this variable.<br/> 85 91 !> request could be: 86 !> - interpolation method 87 !> - extrapolation method 88 !> - filter method 92 !> - int = interpolation method 93 !> - ext = extrapolation method 94 !> - flt = filter method 95 !> - unt = new units 96 !> - unf = unit scale factor (linked to new units) 89 97 !> 90 98 !> requests must be separated by ';'.<br/> … … 94 102 !> @ref extrap and @ref filter.<br/> 95 103 !> 96 !> Example: 'votemper: linear;hann;dist_weight', 'vosaline:cubic'104 !> Example: 'votemper:int=linear;flt=hann;ext=dist_weight', 'vosaline:int=cubic' 97 105 !> @note 98 106 !> If you do not specify a method which is required, … … 136 144 !> segments are separated by '|'.<br/> 137 145 !> each segments of the boundary is composed of: 138 !> - orthogonal indice (.ie. for north boundary,139 !> J-indice where boundary are).140 !> - first indice of boundary(I-indice for north boundary)141 !> - last indice of boundary(I-indice for north boundary)<br/>142 !> indices must be separated by ' ,' .<br/>146 !> - indice of velocity (orthogonal to boundary .ie. 147 !> for north boundary, J-indice). 148 !> - indice of segemnt start (I-indice for north boundary) 149 !> - indice of segment end (I-indice for north boundary)<br/> 150 !> indices must be separated by ':' .<br/> 143 151 !> - optionally, boundary size could be added between '(' and ')' 144 152 !> in the first segment defined. … … 147 155 !> 148 156 !> Examples: 149 !> - cn_north='index1,first1,last1(width)' 150 !> - cn_north='index1(width),first1,last1|index2,first2,last2' 151 !> 152 !> \image html boundary_50.png 153 !> \image latex boundary_50.png 154 !> 157 !> - cn_north='index1,first1:last1(width)' 158 !> - cn_north='index1(width),first1:last1|index2,first2:last2' 159 !> \image html boundary_50.png 160 !> \image latex boundary_50.png 155 161 !> - cn_south : south boundary indices on fine grid 156 162 !> - cn_east : east boundary indices on fine grid 157 163 !> - cn_west : west boundary indices on fine grid 158 164 !> - ln_oneseg : use only one segment for each boundary or not 159 !> - in_extrap : number of mask point to be extrapolated 160 !> 161 !> * _output namelist (namout)_:<br/> 165 !> 166 !> * _output namelist (namout)_:<br/> 162 167 !> - cn_fileout : fine grid boundary basename 163 168 !> (cardinal and segment number will be automatically added) 169 !> - dn_dayofs : date offset in day (change only ouput file name) 170 !> - ln_extrap : extrapolate land point or not 171 !> 172 !> Examples: 173 !> - cn_fileout=boundary.nc<br/> 174 !> if time_counter (16/07/2015 00h) is read on input file (see varfile), 175 !> west boundary will be named boundary_west_y2015m07d16 176 !> - dn_dayofs=-2.<br/> 177 !> if you use day offset you get boundary_west_y2015m07d14 178 !> 164 179 !> 165 180 !> @author J.Paul … … 169 184 !> - add header for user 170 185 !> - take into account grid point to compue boundaries 171 !> - reorder output dimension for north and south boundaries 186 !> - reorder output dimension for north and south boundaries 187 !> @date June, 2015 188 !> - extrapolate all land points, and add ln_extrap in namelist. 189 !> - allow to change unit. 190 !> @date July, 2015 191 !> - add namelist parameter to shift date of output file name. 172 192 !> 173 193 !> @note Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 191 211 USE dom ! domain manager 192 212 USE grid ! grid manager 193 USE vgrid ! v artical grid manager213 USE vgrid ! vertical grid manager 194 214 USE extrap ! extrapolation manager 195 215 USE interp ! interpolation manager … … 213 233 INTEGER(i4) :: il_status 214 234 INTEGER(i4) :: il_fileid 215 INTEGER(i4) :: il_dim216 235 INTEGER(i4) :: il_imin0 217 236 INTEGER(i4) :: il_imax0 … … 239 258 240 259 TYPE(TDIM) , DIMENSION(ip_maxdim) :: tl_dim 260 261 TYPE(TDATE) :: tl_date 241 262 242 263 TYPE(TBDY) , DIMENSION(ip_ncard) :: tl_bdy … … 265 286 ! namelist variable 266 287 ! namlog 267 CHARACTER(LEN=lc) 268 CHARACTER(LEN=lc) 269 INTEGER(i4) 288 CHARACTER(LEN=lc) :: cn_logfile = 'create_boundary.log' 289 CHARACTER(LEN=lc) :: cn_verbosity = 'warning' 290 INTEGER(i4) :: in_maxerror = 5 270 291 271 292 ! namcfg 272 CHARACTER(LEN=lc) 293 CHARACTER(LEN=lc) :: cn_varcfg = 'variable.cfg' 273 294 274 295 ! namcrs 275 CHARACTER(LEN=lc) 276 INTEGER(i4) 296 CHARACTER(LEN=lc) :: cn_coord0 = '' 297 INTEGER(i4) :: in_perio0 = -1 277 298 278 299 ! namfin 279 CHARACTER(LEN=lc) 280 CHARACTER(LEN=lc) 281 INTEGER(i4) 300 CHARACTER(LEN=lc) :: cn_coord1 = '' 301 CHARACTER(LEN=lc) :: cn_bathy1 = '' 302 INTEGER(i4) :: in_perio1 = -1 282 303 283 304 !namzgr 284 INTEGER(i4) :: in_nlevel = 75 305 REAL(dp) :: dn_pp_to_be_computed = 0._dp 306 REAL(dp) :: dn_ppsur = -3958.951371276829_dp 307 REAL(dp) :: dn_ppa0 = 103.9530096000000_dp 308 REAL(dp) :: dn_ppa1 = 2.4159512690000_dp 309 REAL(dp) :: dn_ppa2 = 100.7609285000000_dp 310 REAL(dp) :: dn_ppkth = 15.3510137000000_dp 311 REAL(dp) :: dn_ppkth2 = 48.0298937200000_dp 312 REAL(dp) :: dn_ppacr = 7.0000000000000_dp 313 REAL(dp) :: dn_ppacr2 = 13.000000000000_dp 314 REAL(dp) :: dn_ppdzmin = 6._dp 315 REAL(dp) :: dn_pphmax = 5750._dp 316 INTEGER(i4) :: in_nlevel = 75 317 318 !namzps 319 REAL(dp) :: dn_e3zps_min = 25._dp 320 REAL(dp) :: dn_e3zps_rat = 0.2_dp 285 321 286 322 ! namvar … … 289 325 290 326 ! namnst 291 INTEGER(i4) 292 INTEGER(i4) 327 INTEGER(i4) :: in_rhoi = 0 328 INTEGER(i4) :: in_rhoj = 0 293 329 294 330 ! nambdy 295 LOGICAL :: ln_north = .TRUE. 296 LOGICAL :: ln_south = .TRUE. 297 LOGICAL :: ln_east = .TRUE. 298 LOGICAL :: ln_west = .TRUE. 299 CHARACTER(LEN=lc) :: cn_north = '' 300 CHARACTER(LEN=lc) :: cn_south = '' 301 CHARACTER(LEN=lc) :: cn_east = '' 302 CHARACTER(LEN=lc) :: cn_west = '' 303 LOGICAL :: ln_oneseg = .TRUE. 304 INTEGER(i4) :: in_extrap = 0 331 LOGICAL :: ln_north = .TRUE. 332 LOGICAL :: ln_south = .TRUE. 333 LOGICAL :: ln_east = .TRUE. 334 LOGICAL :: ln_west = .TRUE. 335 CHARACTER(LEN=lc) :: cn_north = '' 336 CHARACTER(LEN=lc) :: cn_south = '' 337 CHARACTER(LEN=lc) :: cn_east = '' 338 CHARACTER(LEN=lc) :: cn_west = '' 339 LOGICAL :: ln_oneseg = .TRUE. 305 340 306 341 ! namout 307 CHARACTER(LEN=lc) :: cn_fileout = 'boundary.nc' 342 CHARACTER(LEN=lc) :: cn_fileout = 'boundary.nc' 343 REAL(dp) :: dn_dayofs = 0._dp 344 LOGICAL :: ln_extrap = .FALSE. 308 345 !------------------------------------------------------------------- 309 346 … … 319 356 & cn_coord0, & !< coordinate file 320 357 & in_perio0 !< periodicity index 321 358 322 359 NAMELIST /namfin/ & !< fine grid namelist 323 360 & cn_coord1, & !< coordinate file … … 326 363 327 364 NAMELIST /namzgr/ & 328 & in_nlevel 365 & dn_pp_to_be_computed, & 366 & dn_ppsur, & 367 & dn_ppa0, & 368 & dn_ppa1, & 369 & dn_ppa2, & 370 & dn_ppkth, & 371 & dn_ppkth2, & 372 & dn_ppacr, & 373 & dn_ppacr2, & 374 & dn_ppdzmin, & 375 & dn_pphmax, & 376 & in_nlevel !< number of vertical level 377 378 NAMELIST /namzps/ & 379 & dn_e3zps_min, & 380 & dn_e3zps_rat 329 381 330 382 NAMELIST /namvar/ & !< variable namelist 331 383 & cn_varinfo, & !< list of variable and method to apply on. (ex: 'votemper:linear','vosaline:cubic' ) 332 384 & cn_varfile !< list of variable and file where find it. (ex: 'votemper:GLORYS_gridT.nc' ) 333 385 334 386 NAMELIST /namnst/ & !< nesting namelist 335 387 & in_rhoi, & !< refinement factor in i-direction … … 345 397 & cn_east , & !< east boundary indices on fine grid 346 398 & cn_west , & !< west boundary indices on fine grid 347 & ln_oneseg, & !< use only one segment for each boundary or not 348 & in_extrap !< number of mask point to be extrapolated 399 & ln_oneseg !< use only one segment for each boundary or not 349 400 350 401 NAMELIST /namout/ & !< output namelist 351 & cn_fileout !< fine grid boundary file basename 402 & cn_fileout, & !< fine grid boundary file basename 403 & dn_dayofs, & !< date offset in day (change only ouput file name) 404 & ln_extrap !< extrapolate or not 352 405 !------------------------------------------------------------------- 353 406 … … 448 501 ! check 449 502 ! check output file do not already exist 503 ! WARNING: do not work when use time to create output file name 450 504 DO jk=1,ip_ncard 451 505 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 452 506 & TRIM(cp_card(jk)), 1 ) 507 INQUIRE(FILE=TRIM(cl_bdyout), EXIST=ll_exist) 508 IF( ll_exist )THEN 509 CALL logger_fatal("CREATE BOUNDARY: output file "//TRIM(cl_bdyout)//& 510 & " already exist.") 511 ENDIF 512 513 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 514 & TRIM(cp_card(jk)) ) 453 515 INQUIRE(FILE=TRIM(cl_bdyout), EXIST=ll_exist) 454 516 IF( ll_exist )THEN … … 490 552 491 553 CALL iom_mpp_open(tl_bathy1) 492 554 493 555 tl_var1=iom_mpp_read_var(tl_bathy1,'Bathymetry') 494 556 495 557 CALL iom_mpp_close(tl_bathy1) 496 558 559 ! get boundaries indices 497 560 tl_bdy(:)=boundary_init(tl_var1, ln_north, ln_south, ln_east, ln_west, & 498 561 & cn_north, cn_south, cn_east, cn_west, & … … 505 568 tl_level(:)=vgrid_get_level(tl_bathy1, cl_namelist ) 506 569 507 ! get coordinate oneach segment of each boundary570 ! get coordinate for each segment of each boundary 508 571 ALLOCATE( tl_segdom1(ip_npoint,ip_maxseg,ip_ncard) ) 509 572 ALLOCATE( tl_seglvl1(ip_npoint,ip_maxseg,ip_ncard) ) 510 573 511 574 DO jl=1,ip_ncard 512 575 IF( tl_bdy(jl)%l_use )THEN … … 516 579 tl_segdom1(:,jk,jl)=create_boundary_get_dom( tl_bathy1, & 517 580 & tl_bdy(jl), jk ) 581 582 IF( .NOT. ln_extrap )THEN 583 ! get fine grid level 584 tl_seglvl1(:,jk,jl)= & 585 & create_boundary_get_level( tl_level(:), & 586 & tl_segdom1(:,jk,jl)) 587 ENDIF 518 588 519 589 ! add extra band to fine grid domain (if possible) … … 523 593 & il_rho(jp_I), il_rho(jp_J)) 524 594 ENDDO 525 526 ! get fine grid level527 tl_seglvl1(:,jk,jl)=create_boundary_get_level( tl_level(:), &528 tl_segdom1(:,jk,jl))529 595 530 596 ENDDO … … 594 660 & in_nlevel ) 595 661 596 ! use mask597 CALL create_boundary_use_mask( tl_segvar1(jvar,jk,jl), &598 & tl_seglvl1(jpoint,jk,jl))599 600 662 !del extra 601 663 CALL dom_del_extra( tl_segvar1(jvar,jk,jl), & … … 654 716 IF( tl_bdy(jl)%l_use )THEN 655 717 656 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//' boundary' 718 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//& 719 & ' boundary' 657 720 DO jk=1,tl_bdy(jl)%i_nseg 658 721 ! compute domain on fine grid … … 662 725 663 726 cl_name=tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_name 664 WRITE(*,'(4x,a,a)') "work on variable "//TRIM(cl_name) 727 WRITE(*,'(4x,a,a)') "work on (extract) variable "//& 728 & TRIM(cl_name) 665 729 666 730 cl_point=tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_point … … 678 742 679 743 tl_dom1=dom_copy(tl_segdom1(jpoint,jk,jl)) 680 tl_lvl1=var_copy(tl_seglvl1(jpoint,jk,jl))681 744 682 745 ! open mpp files … … 687 750 & tl_mpp, TRIM(cl_name), tl_dom1) 688 751 689 ! use mask690 CALL create_boundary_use_mask( &691 & tl_segvar1(jvar+jj,jk,jl), tl_lvl1)692 693 752 ! del extra point 694 753 CALL dom_del_extra( tl_segvar1(jvar+jj,jk,jl), & … … 699 758 700 759 ! add attribute to variable 701 tl_att=att_init('src_file',TRIM(fct_basename(tl_mpp%c_name))) 760 tl_att=att_init('src_file', & 761 & TRIM(fct_basename(tl_mpp%c_name))) 702 762 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 703 763 704 tl_att=att_init('src_i_indices',(/tl_dom1%i_imin, tl_dom1%i_imax/)) 764 tl_att=att_init('src_i_indices', & 765 & (/tl_dom1%i_imin, tl_dom1%i_imax/)) 705 766 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 706 767 707 tl_att=att_init('src_j_indices',(/tl_dom1%i_jmin, tl_dom1%i_jmax/)) 768 tl_att=att_init('src_j_indices', & 769 & (/tl_dom1%i_jmin, tl_dom1%i_jmax/)) 708 770 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 709 771 … … 736 798 IF( tl_bdy(jl)%l_use )THEN 737 799 738 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//' boundary' 800 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//& 801 & ' boundary' 739 802 DO jk=1,tl_bdy(jl)%i_nseg 740 803 741 804 ! for each variable of this file 742 805 DO jj=1,tl_multi%t_mpp(ji)%t_proc(1)%i_nvar 743 744 WRITE(*,'(4x,a,a)') "work on variable "//&806 807 WRITE(*,'(4x,a,a)') "work on (interp) variable "//& 745 808 & TRIM(tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_name) 746 809 … … 759 822 760 823 tl_dom1=dom_copy(tl_segdom1(jpoint,jk,jl)) 761 tl_lvl1=var_copy(tl_seglvl1(jpoint,jk,jl))762 824 763 825 CALL create_boundary_get_coord( tl_coord1, tl_dom1, & … … 795 857 & il_jmin0, il_jmax0 ) 796 858 797 ! add extra band (if possible) to compute interpolation 859 ! add extra band (if possible) to compute 860 ! interpolation 798 861 CALL dom_add_extra(tl_dom0) 799 862 … … 815 878 CALL dom_del_extra( tl_segvar1(jvar+jj,jk,jl), & 816 879 & tl_dom0, il_rho(:) ) 817 818 ! use mask819 CALL create_boundary_use_mask( &820 & tl_segvar1(jvar+jj,jk,jl), tl_lvl1)821 880 822 881 ! del extra point on fine grid … … 889 948 890 949 IF( jvar /= tl_multi%i_nvar )THEN 891 CALL logger_error("CREATE BOUNDARY: it seems some variable can not be read") 950 CALL logger_error("CREATE BOUNDARY: it seems some variable "//& 951 & "can not be read") 892 952 ENDIF 893 894 CALL var_clean(tl_seglvl1(:,:,:))895 DEALLOCATE( tl_seglvl1 )896 953 897 954 ! write file for each segment of each boundary 898 955 DO jl=1,ip_ncard 899 956 IF( tl_bdy(jl)%l_use )THEN 900 901 SELECT CASE(TRIM(tl_bdy(jk)%c_card))902 CASE('north','south')903 il_dim=1904 CASE('east','west')905 il_dim=2906 END SELECT907 957 908 958 DO jk=1,tl_bdy(jl)%i_nseg … … 911 961 & 'T', tl_lon1, tl_lat1 ) 912 962 963 ! force to use nav_lon, nav_lat as variable name 964 tl_lon1%c_name='nav_lon' 965 tl_lat1%c_name='nav_lat' 966 913 967 ! del extra point on fine grid 914 968 CALL dom_del_extra( tl_lon1, tl_segdom1(jp_T,jk,jl) ) … … 924 978 CALL boundary_swap(tl_lat1, tl_bdy(jl)) 925 979 DO jvar=1,tl_multi%i_nvar 926 CALL boundary_swap(tl_segvar1(jvar,jk,jl), tl_bdy(jl))927 980 928 981 ! use additional request 982 ! change unit and apply factor 983 CALL var_chg_unit(tl_segvar1(jvar,jk,jl)) 984 929 985 ! forced min and max value 930 986 CALL var_limit_value(tl_segvar1(jvar,jk,jl)) … … 933 989 CALL filter_fill_value(tl_segvar1(jvar,jk,jl)) 934 990 935 ! extrapolate 936 CALL extrap_fill_value( tl_segvar1(jvar,jk,jl), & 937 & id_iext=in_extrap, & 938 & id_jext=in_extrap, & 939 & id_kext=in_extrap ) 991 IF( .NOT. ln_extrap )THEN 992 ! use mask 993 SELECT CASE(TRIM(tl_segvar1(jvar,jk,jl)%c_point)) 994 CASE DEFAULT !'T' 995 jpoint=jp_T 996 CASE('U') 997 jpoint=jp_U 998 CASE('V') 999 jpoint=jp_V 1000 CASE('F') 1001 jpoint=jp_F 1002 END SELECT 1003 1004 CALL create_boundary_use_mask(tl_segvar1(jvar,jk,jl), & 1005 & tl_seglvl1(jpoint,jk,jl)) 1006 ENDIF 1007 1008 ! swap dimension order 1009 CALL boundary_swap(tl_segvar1(jvar,jk,jl), tl_bdy(jl)) 940 1010 941 1011 ENDDO … … 944 1014 ! create file structure 945 1015 ! set file namearray of level variable structure 946 IF( ASSOCIATED(tl_time%d_value) )THEN 947 cl_fmt="('y',i0.4,'m',i0.2,'d',i0.2)" 948 cl_date=date_print( var_to_date(tl_time), cl_fmt ) 949 950 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 951 & TRIM(tl_bdy(jl)%c_card), jk, TRIM(cl_date) ) 1016 IF( tl_bdy(jl)%i_nseg > 1 )THEN 1017 IF( ASSOCIATED(tl_time%d_value) )THEN 1018 cl_fmt="('y',i0.4,'m',i0.2,'d',i0.2)" 1019 tl_date=var_to_date(tl_time) 1020 tl_date=tl_date+dn_dayofs 1021 cl_date=date_print( tl_date, cl_fmt ) 1022 1023 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 1024 & TRIM(tl_bdy(jl)%c_card), jk,& 1025 & cd_date=TRIM(cl_date) ) 1026 ELSE 1027 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 1028 & TRIM(tl_bdy(jl)%c_card), jk ) 1029 ENDIF 952 1030 ELSE 953 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 954 & TRIM(tl_bdy(jl)%c_card), jk ) 1031 IF( ASSOCIATED(tl_time%d_value) )THEN 1032 cl_fmt="('y',i0.4,'m',i0.2,'d',i0.2)" 1033 tl_date=var_to_date(tl_time) 1034 tl_date=tl_date+dn_dayofs 1035 cl_date=date_print( tl_date, cl_fmt ) 1036 1037 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 1038 & TRIM(tl_bdy(jl)%c_card), & 1039 & cd_date=TRIM(cl_date) ) 1040 ELSE 1041 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 1042 & TRIM(tl_bdy(jl)%c_card) ) 1043 ENDIF 955 1044 ENDIF 956 1045 ! … … 960 1049 tl_dim(:)=var_max_dim(tl_segvar1(:,jk,jl)) 961 1050 962 CALL dim_unorder(tl_dim(:))963 1051 SELECT CASE(TRIM(tl_bdy(jl)%c_card)) 964 1052 CASE DEFAULT ! 'north','south' 965 1053 cl_dimorder='xyzt' 966 CALL dim_reorder(tl_dim(:),TRIM(cl_dimorder))967 1054 CASE('east','west') 968 1055 cl_dimorder='yxzt' 969 CALL dim_reorder(tl_dim(:),TRIM(cl_dimorder))970 ! reorder coordinates dimension971 CALL var_reorder(tl_lon1,TRIM(cl_dimorder))972 CALL var_reorder(tl_lat1,TRIM(cl_dimorder))973 ! reorder other variable dimension974 DO jvar=1,tl_multi%i_nvar975 CALL var_reorder(tl_segvar1(jvar,jk,jl),TRIM(cl_dimorder))976 ENDDO977 1056 END SELECT 978 1057 … … 992 1071 ENDIF 993 1072 1073 1074 994 1075 IF( tl_dim(3)%l_use )THEN 995 ! add depth 996 CALL file_add_var(tl_fileout, tl_depth) 1076 IF( ASSOCIATED(tl_depth%d_value) )THEN 1077 ! add depth 1078 CALL file_add_var(tl_fileout, tl_depth) 1079 ENDIF 997 1080 ENDIF 998 1081 999 1082 IF( tl_dim(4)%l_use )THEN 1000 ! add time 1001 CALL file_add_var(tl_fileout, tl_time) 1083 IF( ASSOCIATED(tl_time%d_value) )THEN 1084 ! add time 1085 CALL file_add_var(tl_fileout, tl_time) 1086 ENDIF 1002 1087 ENDIF 1003 1088 1004 1089 ! add other variable 1005 DO jvar= 1,tl_multi%i_nvar1090 DO jvar=tl_multi%i_nvar,1,-1 1006 1091 CALL file_add_var(tl_fileout, tl_segvar1(jvar,jk,jl)) 1007 1092 CALL var_clean(tl_segvar1(jvar,jk,jl)) … … 1048 1133 1049 1134 ! write file 1050 CALL iom_write_file(tl_fileout )1135 CALL iom_write_file(tl_fileout, cl_dimorder) 1051 1136 1052 1137 ! close file … … 1066 1151 DEALLOCATE( tl_segdom1 ) 1067 1152 DEALLOCATE( tl_segvar1 ) 1153 CALL var_clean(tl_seglvl1(:,:,:)) 1154 DEALLOCATE( tl_seglvl1 ) 1155 1068 1156 1069 1157 CALL mpp_clean(tl_coord1) … … 1082 1170 !> 1083 1171 !> @author J.Paul 1084 !> - November, 2013- Initial Version1172 !> @date November, 2013 - Initial Version 1085 1173 !> @date September, 2014 1086 1174 !> - take into account grid point to compute boundary indices … … 1186 1274 !------------------------------------------------------------------- 1187 1275 !> @brief 1188 !> This subroutine get coordinates over bou dnary domain1276 !> This subroutine get coordinates over boundary domain 1189 1277 !> 1190 1278 !> @author J.Paul 1191 !> - November, 2013- Initial Version 1192 !> @date September, 2014 - take into account grid point 1279 !> @date November, 2013 - Initial Version 1280 !> @date September, 2014 1281 !> - take into account grid point 1193 1282 !> 1194 1283 !> @param[in] td_coord1 coordinates file structure … … 1237 1326 !------------------------------------------------------------------- 1238 1327 !> @brief 1239 !> This subroutine interpolate variable o verboundary1328 !> This subroutine interpolate variable on boundary 1240 1329 !> 1241 1330 !> @details 1242 1331 !> 1243 1332 !> @author J.Paul 1244 !> - Nov, 2013- Initial Version1333 !> @date November, 2013 - Initial Version 1245 1334 !> 1246 1335 !> @param[inout] td_var variable structure … … 1296 1385 1297 1386 ! extrapolate variable 1298 CALL extrap_fill_value( td_var , id_iext=il_iext, id_jext=il_jext)1387 CALL extrap_fill_value( td_var ) 1299 1388 1300 1389 ! interpolate Bathymetry … … 1303 1392 1304 1393 ! remove extraband 1305 CALL extrap_del_extrabands(td_var, il_iext*id_rho(jp_I), il_jext*id_rho(jp_J)) 1394 CALL extrap_del_extrabands(td_var, il_iext*id_rho(jp_I), & 1395 & il_jext*id_rho(jp_J)) 1306 1396 1307 1397 END SUBROUTINE create_boundary_interp … … 1317 1407 !> 1318 1408 !> @author J.Paul 1319 !> - November, 2013- Initial Version1409 !> @date November, 2013 - Initial Version 1320 1410 !> 1321 1411 !> @param[in] td_var variable structure … … 1422 1512 !> 1423 1513 !> @author J.Paul 1424 !> - November, 2013- Initial Version1514 !> @date November, 2013 - Initial Version 1425 1515 !> 1426 1516 !> @param[inout] td_var variable structure … … 1475 1565 !> 1476 1566 !> @author J.Paul 1477 !> - November, 2013- Initial Version1567 !> @date November, 2013 - Initial Version 1478 1568 !> 1479 1569 !> @param[in] td_level array of level variable structure … … 1537 1627 !> 1538 1628 !> @author J.Paul 1539 !> - November, 2014- Initial Version1629 !> @date November, 2014 - Initial Version 1540 1630 !> 1541 1631 !> @param[in] td_mpp mpp structure … … 1588 1678 !> 1589 1679 !> @author J.Paul 1590 !> - November, 2014- Initial Version1680 !> @date November, 2014 - Initial Version 1591 1681 !> 1592 1682 !> @param[in] td_mpp mpp structure
Note: See TracChangeset
for help on using the changeset viewer.