Changeset 10251 for branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/TOOLS/SIREN/src/create_boundary.f90
- Timestamp:
- 2018-10-29T15:20:26+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
r10248 r10251 23 23 !> ./SIREN/bin/create_boundary create_boundary.nam 24 24 !> @endcode 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 !> 25 !> 32 26 !> create_boundary.nam comprise 9 namelists:<br/> 33 27 !> - logger namelist (namlog) … … 48 42 !> - cn_logfile : log filename 49 43 !> - cn_verbosity : verbosity ('trace','debug','info', 50 !> 'warning','error','fatal' ,'none')44 !> 'warning','error','fatal') 51 45 !> - in_maxerror : maximum number of error allowed 52 46 !> … … 85 79 !> * _variable namelist (namvar)_:<br/> 86 80 !> - cn_varinfo : list of variable and extra information about request(s) 87 !> to be used (separated by ',').<br/>81 !> to be used.<br/> 88 82 !> each elements of *cn_varinfo* is a string character.<br/> 89 83 !> it is composed of the variable name follow by ':', 90 84 !> then request(s) to be used on this variable.<br/> 91 85 !> request could be: 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) 86 !> - interpolation method 87 !> - extrapolation method 88 !> - filter method 97 89 !> 98 90 !> requests must be separated by ';'.<br/> … … 102 94 !> @ref extrap and @ref filter.<br/> 103 95 !> 104 !> Example: 'votemper: int=linear;flt=hann;ext=dist_weight', 'vosaline:int=cubic'96 !> Example: 'votemper:linear;hann;dist_weight', 'vosaline:cubic' 105 97 !> @note 106 98 !> If you do not specify a method which is required, … … 144 136 !> segments are separated by '|'.<br/> 145 137 !> each segments of the boundary is composed of: 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/>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/> 151 143 !> - optionally, boundary size could be added between '(' and ')' 152 144 !> in the first segment defined. … … 155 147 !> 156 148 !> Examples: 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 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 !> 161 155 !> - cn_south : south boundary indices on fine grid 162 156 !> - cn_east : east boundary indices on fine grid 163 157 !> - cn_west : west boundary indices on fine grid 164 158 !> - ln_oneseg : use only one segment for each boundary or not 165 !> 166 !> * _output namelist (namout)_:<br/> 159 !> - in_extrap : number of mask point to be extrapolated 160 !> 161 !> * _output namelist (namout)_:<br/> 167 162 !> - cn_fileout : fine grid boundary basename 168 163 !> (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 not171 !>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_y2015m07d16176 !> - dn_dayofs=-2.<br/>177 !> if you use day offset you get boundary_west_y2015m07d14178 !>179 164 !> 180 165 !> @author J.Paul … … 184 169 !> - add header for user 185 170 !> - take into account grid point to compue 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. 171 !> - reorder output dimension for north and south boundaries 192 172 !> 193 173 !> @note Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 211 191 USE dom ! domain manager 212 192 USE grid ! grid manager 213 USE vgrid ! v ertical grid manager193 USE vgrid ! vartical grid manager 214 194 USE extrap ! extrapolation manager 215 195 USE interp ! interpolation manager … … 233 213 INTEGER(i4) :: il_status 234 214 INTEGER(i4) :: il_fileid 215 INTEGER(i4) :: il_dim 235 216 INTEGER(i4) :: il_imin0 236 217 INTEGER(i4) :: il_imax0 … … 258 239 259 240 TYPE(TDIM) , DIMENSION(ip_maxdim) :: tl_dim 260 261 TYPE(TDATE) :: tl_date262 241 263 242 TYPE(TBDY) , DIMENSION(ip_ncard) :: tl_bdy … … 286 265 ! namelist variable 287 266 ! namlog 288 CHARACTER(LEN=lc) :: cn_logfile = 'create_boundary.log'289 CHARACTER(LEN=lc) :: cn_verbosity = 'warning'290 INTEGER(i4) :: in_maxerror = 5267 CHARACTER(LEN=lc) :: cn_logfile = 'create_boundary.log' 268 CHARACTER(LEN=lc) :: cn_verbosity = 'warning' 269 INTEGER(i4) :: in_maxerror = 5 291 270 292 271 ! namcfg 293 CHARACTER(LEN=lc) :: cn_varcfg = 'variable.cfg'272 CHARACTER(LEN=lc) :: cn_varcfg = 'variable.cfg' 294 273 295 274 ! namcrs 296 CHARACTER(LEN=lc) :: cn_coord0 = ''297 INTEGER(i4) :: in_perio0 = -1275 CHARACTER(LEN=lc) :: cn_coord0 = '' 276 INTEGER(i4) :: in_perio0 = -1 298 277 299 278 ! namfin 300 CHARACTER(LEN=lc) :: cn_coord1 = ''301 CHARACTER(LEN=lc) :: cn_bathy1 = ''302 INTEGER(i4) :: in_perio1 = -1279 CHARACTER(LEN=lc) :: cn_coord1 = '' 280 CHARACTER(LEN=lc) :: cn_bathy1 = '' 281 INTEGER(i4) :: in_perio1 = -1 303 282 304 283 !namzgr 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 284 INTEGER(i4) :: in_nlevel = 75 321 285 322 286 ! namvar … … 325 289 326 290 ! namnst 327 INTEGER(i4) :: in_rhoi = 0328 INTEGER(i4) :: in_rhoj = 0291 INTEGER(i4) :: in_rhoi = 0 292 INTEGER(i4) :: in_rhoj = 0 329 293 330 294 ! nambdy 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. 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 340 305 341 306 ! namout 342 CHARACTER(LEN=lc) :: cn_fileout = 'boundary.nc' 343 REAL(dp) :: dn_dayofs = 0._dp 344 LOGICAL :: ln_extrap = .FALSE. 307 CHARACTER(LEN=lc) :: cn_fileout = 'boundary.nc' 345 308 !------------------------------------------------------------------- 346 309 … … 356 319 & cn_coord0, & !< coordinate file 357 320 & in_perio0 !< periodicity index 358 321 359 322 NAMELIST /namfin/ & !< fine grid namelist 360 323 & cn_coord1, & !< coordinate file … … 363 326 364 327 NAMELIST /namzgr/ & 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 328 & in_nlevel 381 329 382 330 NAMELIST /namvar/ & !< variable namelist 383 331 & cn_varinfo, & !< list of variable and method to apply on. (ex: 'votemper:linear','vosaline:cubic' ) 384 332 & cn_varfile !< list of variable and file where find it. (ex: 'votemper:GLORYS_gridT.nc' ) 385 333 386 334 NAMELIST /namnst/ & !< nesting namelist 387 335 & in_rhoi, & !< refinement factor in i-direction … … 397 345 & cn_east , & !< east boundary indices on fine grid 398 346 & cn_west , & !< west boundary indices on fine grid 399 & ln_oneseg !< use only one segment for each boundary or not 347 & ln_oneseg, & !< use only one segment for each boundary or not 348 & in_extrap !< number of mask point to be extrapolated 400 349 401 350 NAMELIST /namout/ & !< output namelist 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 351 & cn_fileout !< fine grid boundary file basename 405 352 !------------------------------------------------------------------- 406 353 … … 501 448 ! check 502 449 ! check output file do not already exist 503 ! WARNING: do not work when use time to create output file name504 450 DO jk=1,ip_ncard 505 451 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 506 452 & TRIM(cp_card(jk)), 1 ) 507 INQUIRE(FILE=TRIM(cl_bdyout), EXIST=ll_exist)508 IF( ll_exist )THEN509 CALL logger_fatal("CREATE BOUNDARY: output file "//TRIM(cl_bdyout)//&510 & " already exist.")511 ENDIF512 513 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), &514 & TRIM(cp_card(jk)) )515 453 INQUIRE(FILE=TRIM(cl_bdyout), EXIST=ll_exist) 516 454 IF( ll_exist )THEN … … 552 490 553 491 CALL iom_mpp_open(tl_bathy1) 554 492 555 493 tl_var1=iom_mpp_read_var(tl_bathy1,'Bathymetry') 556 494 557 495 CALL iom_mpp_close(tl_bathy1) 558 496 559 ! get boundaries indices560 497 tl_bdy(:)=boundary_init(tl_var1, ln_north, ln_south, ln_east, ln_west, & 561 498 & cn_north, cn_south, cn_east, cn_west, & … … 568 505 tl_level(:)=vgrid_get_level(tl_bathy1, cl_namelist ) 569 506 570 ! get coordinate foreach segment of each boundary507 ! get coordinate on each segment of each boundary 571 508 ALLOCATE( tl_segdom1(ip_npoint,ip_maxseg,ip_ncard) ) 572 509 ALLOCATE( tl_seglvl1(ip_npoint,ip_maxseg,ip_ncard) ) 573 510 574 511 DO jl=1,ip_ncard 575 512 IF( tl_bdy(jl)%l_use )THEN … … 579 516 tl_segdom1(:,jk,jl)=create_boundary_get_dom( tl_bathy1, & 580 517 & tl_bdy(jl), jk ) 581 582 IF( .NOT. ln_extrap )THEN583 ! get fine grid level584 tl_seglvl1(:,jk,jl)= &585 & create_boundary_get_level( tl_level(:), &586 & tl_segdom1(:,jk,jl))587 ENDIF588 518 589 519 ! add extra band to fine grid domain (if possible) … … 593 523 & il_rho(jp_I), il_rho(jp_J)) 594 524 ENDDO 525 526 ! get fine grid level 527 tl_seglvl1(:,jk,jl)=create_boundary_get_level( tl_level(:), & 528 tl_segdom1(:,jk,jl)) 595 529 596 530 ENDDO … … 660 594 & in_nlevel ) 661 595 596 ! use mask 597 CALL create_boundary_use_mask( tl_segvar1(jvar,jk,jl), & 598 & tl_seglvl1(jpoint,jk,jl)) 599 662 600 !del extra 663 601 CALL dom_del_extra( tl_segvar1(jvar,jk,jl), & … … 716 654 IF( tl_bdy(jl)%l_use )THEN 717 655 718 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//& 719 & ' boundary' 656 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//' boundary' 720 657 DO jk=1,tl_bdy(jl)%i_nseg 721 658 ! compute domain on fine grid … … 725 662 726 663 cl_name=tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_name 727 WRITE(*,'(4x,a,a)') "work on (extract) variable "//& 728 & TRIM(cl_name) 664 WRITE(*,'(4x,a,a)') "work on variable "//TRIM(cl_name) 729 665 730 666 cl_point=tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_point … … 742 678 743 679 tl_dom1=dom_copy(tl_segdom1(jpoint,jk,jl)) 680 tl_lvl1=var_copy(tl_seglvl1(jpoint,jk,jl)) 744 681 745 682 ! open mpp files … … 750 687 & tl_mpp, TRIM(cl_name), tl_dom1) 751 688 689 ! use mask 690 CALL create_boundary_use_mask( & 691 & tl_segvar1(jvar+jj,jk,jl), tl_lvl1) 692 752 693 ! del extra point 753 694 CALL dom_del_extra( tl_segvar1(jvar+jj,jk,jl), & … … 758 699 759 700 ! add attribute to variable 760 tl_att=att_init('src_file', & 761 & TRIM(fct_basename(tl_mpp%c_name))) 701 tl_att=att_init('src_file',TRIM(fct_basename(tl_mpp%c_name))) 762 702 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 763 703 764 tl_att=att_init('src_i_indices', & 765 & (/tl_dom1%i_imin, tl_dom1%i_imax/)) 704 tl_att=att_init('src_i_indices',(/tl_dom1%i_imin, tl_dom1%i_imax/)) 766 705 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 767 706 768 tl_att=att_init('src_j_indices', & 769 & (/tl_dom1%i_jmin, tl_dom1%i_jmax/)) 707 tl_att=att_init('src_j_indices',(/tl_dom1%i_jmin, tl_dom1%i_jmax/)) 770 708 CALL var_move_att(tl_segvar1(jvar+jj,jk,jl), tl_att) 771 709 … … 798 736 IF( tl_bdy(jl)%l_use )THEN 799 737 800 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//& 801 & ' boundary' 738 WRITE(*,'(2x,a,a)') 'work on '//TRIM(tl_bdy(jl)%c_card)//' boundary' 802 739 DO jk=1,tl_bdy(jl)%i_nseg 803 740 804 741 ! for each variable of this file 805 742 DO jj=1,tl_multi%t_mpp(ji)%t_proc(1)%i_nvar 806 807 WRITE(*,'(4x,a,a)') "work on (interp)variable "//&743 744 WRITE(*,'(4x,a,a)') "work on variable "//& 808 745 & TRIM(tl_multi%t_mpp(ji)%t_proc(1)%t_var(jj)%c_name) 809 746 … … 822 759 823 760 tl_dom1=dom_copy(tl_segdom1(jpoint,jk,jl)) 761 tl_lvl1=var_copy(tl_seglvl1(jpoint,jk,jl)) 824 762 825 763 CALL create_boundary_get_coord( tl_coord1, tl_dom1, & … … 857 795 & il_jmin0, il_jmax0 ) 858 796 859 ! add extra band (if possible) to compute 860 ! interpolation 797 ! add extra band (if possible) to compute interpolation 861 798 CALL dom_add_extra(tl_dom0) 862 799 … … 878 815 CALL dom_del_extra( tl_segvar1(jvar+jj,jk,jl), & 879 816 & tl_dom0, il_rho(:) ) 817 818 ! use mask 819 CALL create_boundary_use_mask( & 820 & tl_segvar1(jvar+jj,jk,jl), tl_lvl1) 880 821 881 822 ! del extra point on fine grid … … 948 889 949 890 IF( jvar /= tl_multi%i_nvar )THEN 950 CALL logger_error("CREATE BOUNDARY: it seems some variable "//& 951 & "can not be read") 891 CALL logger_error("CREATE BOUNDARY: it seems some variable can not be read") 952 892 ENDIF 893 894 CALL var_clean(tl_seglvl1(:,:,:)) 895 DEALLOCATE( tl_seglvl1 ) 953 896 954 897 ! write file for each segment of each boundary 955 898 DO jl=1,ip_ncard 956 899 IF( tl_bdy(jl)%l_use )THEN 900 901 SELECT CASE(TRIM(tl_bdy(jk)%c_card)) 902 CASE('north','south') 903 il_dim=1 904 CASE('east','west') 905 il_dim=2 906 END SELECT 957 907 958 908 DO jk=1,tl_bdy(jl)%i_nseg … … 961 911 & 'T', tl_lon1, tl_lat1 ) 962 912 963 ! force to use nav_lon, nav_lat as variable name964 tl_lon1%c_name='nav_lon'965 tl_lat1%c_name='nav_lat'966 967 913 ! del extra point on fine grid 968 914 CALL dom_del_extra( tl_lon1, tl_segdom1(jp_T,jk,jl) ) … … 978 924 CALL boundary_swap(tl_lat1, tl_bdy(jl)) 979 925 DO jvar=1,tl_multi%i_nvar 926 CALL boundary_swap(tl_segvar1(jvar,jk,jl), tl_bdy(jl)) 980 927 981 928 ! use additional request 982 ! change unit and apply factor983 CALL var_chg_unit(tl_segvar1(jvar,jk,jl))984 985 929 ! forced min and max value 986 930 CALL var_limit_value(tl_segvar1(jvar,jk,jl)) … … 989 933 CALL filter_fill_value(tl_segvar1(jvar,jk,jl)) 990 934 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)) 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 ) 1010 940 1011 941 ENDDO … … 1014 944 ! create file structure 1015 945 ! set file namearray of level variable structure 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 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) ) 1030 952 ELSE 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 953 cl_bdyout=boundary_set_filename( TRIM(cn_fileout), & 954 & TRIM(tl_bdy(jl)%c_card), jk ) 1044 955 ENDIF 1045 956 ! … … 1049 960 tl_dim(:)=var_max_dim(tl_segvar1(:,jk,jl)) 1050 961 962 CALL dim_unorder(tl_dim(:)) 1051 963 SELECT CASE(TRIM(tl_bdy(jl)%c_card)) 1052 964 CASE DEFAULT ! 'north','south' 1053 965 cl_dimorder='xyzt' 966 CALL dim_reorder(tl_dim(:),TRIM(cl_dimorder)) 1054 967 CASE('east','west') 1055 968 cl_dimorder='yxzt' 969 CALL dim_reorder(tl_dim(:),TRIM(cl_dimorder)) 970 ! reorder coordinates dimension 971 CALL var_reorder(tl_lon1,TRIM(cl_dimorder)) 972 CALL var_reorder(tl_lat1,TRIM(cl_dimorder)) 973 ! reorder other variable dimension 974 DO jvar=1,tl_multi%i_nvar 975 CALL var_reorder(tl_segvar1(jvar,jk,jl),TRIM(cl_dimorder)) 976 ENDDO 1056 977 END SELECT 1057 978 … … 1071 992 ENDIF 1072 993 1073 1074 1075 994 IF( tl_dim(3)%l_use )THEN 1076 IF( ASSOCIATED(tl_depth%d_value) )THEN 1077 ! add depth 1078 CALL file_add_var(tl_fileout, tl_depth) 1079 ENDIF 995 ! add depth 996 CALL file_add_var(tl_fileout, tl_depth) 1080 997 ENDIF 1081 998 1082 999 IF( tl_dim(4)%l_use )THEN 1083 IF( ASSOCIATED(tl_time%d_value) )THEN 1084 ! add time 1085 CALL file_add_var(tl_fileout, tl_time) 1086 ENDIF 1000 ! add time 1001 CALL file_add_var(tl_fileout, tl_time) 1087 1002 ENDIF 1088 1003 1089 1004 ! add other variable 1090 DO jvar= tl_multi%i_nvar,1,-11005 DO jvar=1,tl_multi%i_nvar 1091 1006 CALL file_add_var(tl_fileout, tl_segvar1(jvar,jk,jl)) 1092 1007 CALL var_clean(tl_segvar1(jvar,jk,jl)) … … 1133 1048 1134 1049 ! write file 1135 CALL iom_write_file(tl_fileout , cl_dimorder)1050 CALL iom_write_file(tl_fileout) 1136 1051 1137 1052 ! close file … … 1151 1066 DEALLOCATE( tl_segdom1 ) 1152 1067 DEALLOCATE( tl_segvar1 ) 1153 CALL var_clean(tl_seglvl1(:,:,:))1154 DEALLOCATE( tl_seglvl1 )1155 1156 1068 1157 1069 CALL mpp_clean(tl_coord1) … … 1170 1082 !> 1171 1083 !> @author J.Paul 1172 !> @date November, 2013- Initial Version1084 !> - November, 2013- Initial Version 1173 1085 !> @date September, 2014 1174 1086 !> - take into account grid point to compute boundary indices … … 1274 1186 !------------------------------------------------------------------- 1275 1187 !> @brief 1276 !> This subroutine get coordinates over bou ndary domain1188 !> This subroutine get coordinates over boudnary domain 1277 1189 !> 1278 1190 !> @author J.Paul 1279 !> @date November, 2013 - Initial Version 1280 !> @date September, 2014 1281 !> - take into account grid point 1191 !> - November, 2013- Initial Version 1192 !> @date September, 2014 - take into account grid point 1282 1193 !> 1283 1194 !> @param[in] td_coord1 coordinates file structure … … 1326 1237 !------------------------------------------------------------------- 1327 1238 !> @brief 1328 !> This subroutine interpolate variable o nboundary1239 !> This subroutine interpolate variable over boundary 1329 1240 !> 1330 1241 !> @details 1331 1242 !> 1332 1243 !> @author J.Paul 1333 !> @date November, 2013- Initial Version1244 !> - Nov, 2013- Initial Version 1334 1245 !> 1335 1246 !> @param[inout] td_var variable structure … … 1385 1296 1386 1297 ! extrapolate variable 1387 CALL extrap_fill_value( td_var )1298 CALL extrap_fill_value( td_var, id_iext=il_iext, id_jext=il_jext ) 1388 1299 1389 1300 ! interpolate Bathymetry … … 1392 1303 1393 1304 ! remove extraband 1394 CALL extrap_del_extrabands(td_var, il_iext*id_rho(jp_I), & 1395 & il_jext*id_rho(jp_J)) 1305 CALL extrap_del_extrabands(td_var, il_iext*id_rho(jp_I), il_jext*id_rho(jp_J)) 1396 1306 1397 1307 END SUBROUTINE create_boundary_interp … … 1407 1317 !> 1408 1318 !> @author J.Paul 1409 !> @date November, 2013- Initial Version1319 !> - November, 2013- Initial Version 1410 1320 !> 1411 1321 !> @param[in] td_var variable structure … … 1512 1422 !> 1513 1423 !> @author J.Paul 1514 !> @date November, 2013- Initial Version1424 !> - November, 2013- Initial Version 1515 1425 !> 1516 1426 !> @param[inout] td_var variable structure … … 1565 1475 !> 1566 1476 !> @author J.Paul 1567 !> @date November, 2013- Initial Version1477 !> - November, 2013- Initial Version 1568 1478 !> 1569 1479 !> @param[in] td_level array of level variable structure … … 1627 1537 !> 1628 1538 !> @author J.Paul 1629 !> @date November, 2014- Initial Version1539 !> - November, 2014- Initial Version 1630 1540 !> 1631 1541 !> @param[in] td_mpp mpp structure … … 1678 1588 !> 1679 1589 !> @author J.Paul 1680 !> @date November, 2014- Initial Version1590 !> - November, 2014- Initial Version 1681 1591 !> 1682 1592 !> @param[in] td_mpp mpp structure
Note: See TracChangeset
for help on using the changeset viewer.