New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 6043 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90 – NEMO

Ignore:
Timestamp:
2015-12-14T10:27:28+01:00 (8 years ago)
Author:
timgraham
Message:

Merged head of trunk into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90

    r5600 r6043  
    2828!> @endcode 
    2929!>     
     30!> @note  
     31!>    you could find a template of the namelist in templates directory. 
     32!> 
    3033!>    merge_bathy.nam comprise 8 namelists: 
    3134!>       - logger namelist (namlog) 
     
    4548!>       - cn_logfile   : logger filename 
    4649!>       - cn_verbosity : verbosity ('trace','debug','info', 
    47 !>  'warning','error','fatal') 
     50!>  'warning','error','fatal','none') 
    4851!>       - in_maxerror  : maximum number of error allowed 
    4952!> 
     
    6265!>    * _variable namelist (namvar)_: 
    6366!>       - cn_varinfo : list of variable and extra information about request(s)  
    64 !>       to be used.<br/> 
     67!>       to be used (separated by ',').<br/> 
    6568!>          each elements of *cn_varinfo* is a string character.<br/> 
    6669!>          it is composed of the variable name follow by ':',  
    6770!>          then request(s) to be used on this variable.<br/>  
    6871!>          request could be: 
    69 !>             - interpolation method 
     72!>             - int = interpolation method 
    7073!>  
    7174!>                requests must be separated by ';'.<br/> 
     
    7477!>          informations about available method could be find in  
    7578!>          @ref interp modules.<br/> 
    76 !>          Example: 'bathymetry: cubic' 
     79!>          Example: 'bathymetry: int=cubic' 
    7780!>          @note  
    7881!>             If you do not specify a method which is required,  
     
    9598!>          segments are separated by '|'.<br/> 
    9699!>          each segments of the boundary is composed of: 
    97 !>             - orthogonal indice (.ie. for north boundary, 
    98 !>             J-indice where boundary are).  
    99 !>             - first indice of boundary (I-indice for north boundary)  
    100 !>             - last  indice of boundary (I-indice for north boundary)<br/> 
    101 !>                indices must be separated by ',' .<br/> 
     100!>             - indice of velocity (orthogonal to boundary .ie.  
     101!>                for north boundary, J-indice).  
     102!>             - indice of segment start (I-indice for north boundary)  
     103!>             - indice of segment end  (I-indice for north boundary)<br/> 
     104!>                indices must be separated by ':' .<br/> 
    102105!>             - optionally, boundary size could be added between '(' and ')'  
    103106!>             in the first segment defined. 
     
    106109!> 
    107110!>          Examples: 
    108 !>             - cn_north='index1,first1,last1(width)' 
    109 !>             - cn_north='index1(width),first1,last1|index2,first2,last2' 
     111!>             - cn_north='index1,first1:last1(width)' 
     112!>             - cn_north='index1(width),first1:last1|index2,first2:last2' 
     113!> 
    110114!>       - cn_south : south boundary indices on fine grid<br/> 
    111115!>       - cn_east  : east  boundary indices on fine grid<br/> 
     
    121125!> @date Sepember, 2014  
    122126!> - add header for user 
     127!> @date July, 2015  
     128!> - extrapolate all land points 
     129!> - add attributes with boundary string character (as in namelist) 
    123130!> 
    124131!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    153160   CHARACTER(LEN=lc)                                  :: cl_namelist 
    154161   CHARACTER(LEN=lc)                                  :: cl_date 
     162   CHARACTER(LEN=lc)                                  :: cl_tmp 
    155163 
    156164   INTEGER(i4)                                        :: il_narg 
     
    162170   INTEGER(i4)                                        :: il_jmin0 
    163171   INTEGER(i4)                                        :: il_jmax0 
     172   INTEGER(i4)                                        :: il_shift 
    164173   INTEGER(i4)      , DIMENSION(ip_maxdim)            :: il_rho 
    165174   INTEGER(i4)      , DIMENSION(2,2)                  :: il_ind 
     
    231240   NAMELIST /namlog/ &  !< logger namelist 
    232241   &  cn_logfile,    &  !< log file 
    233    &  cn_verbosity      !< log verbosity 
     242   &  cn_verbosity,  &  !< log verbosity 
     243   &  in_maxerror       !< logger maximum error 
    234244 
    235245   NAMELIST /namcfg/ &  !< config namelist 
     
    298308      READ( il_fileid, NML = namlog ) 
    299309      ! define log file 
    300       CALL logger_open(TRIM(cn_logfile),TRIM(cn_verbosity), in_maxerror) 
     310      CALL logger_open(TRIM(cn_logfile),TRIM(cn_verbosity),in_maxerror) 
    301311      CALL logger_header() 
    302312 
     
    510520   ENDIF 
    511521 
     522 
     523   IF( tl_bdy(jp_north)%l_use )THEN 
     524      ! add shift on north boundary 
     525      ! boundary compute on T point but express on U or V point 
     526      il_shift=1 
     527 
     528      cl_tmp=TRIM(fct_str(tl_bdy(jp_north)%t_seg(1)%i_index-il_shift))//','//& 
     529         &   TRIM(fct_str(tl_bdy(jp_north)%t_seg(1)%i_first))//':'//& 
     530         &   TRIM(fct_str(tl_bdy(jp_north)%t_seg(1)%i_last))//& 
     531         &   '('//TRIM(fct_str(tl_bdy(jp_north)%t_seg(1)%i_width))//')' 
     532      DO ji=2,tl_bdy(jp_north)%i_nseg 
     533         cl_tmp=TRIM(cl_tmp)//'|'//& 
     534            &   TRIM(fct_str(tl_bdy(jp_north)%t_seg(ji)%i_index-il_shift))//','//& 
     535            &   TRIM(fct_str(tl_bdy(jp_north)%t_seg(ji)%i_first))//':'//& 
     536            &   TRIM(fct_str(tl_bdy(jp_north)%t_seg(ji)%i_last)) 
     537      ENDDO 
     538      tl_att=att_init("bdy_north",TRIM(cl_tmp)) 
     539      CALL file_add_att(tl_fileout, tl_att) 
     540   ENDIF 
     541 
     542   IF( tl_bdy(jp_south)%l_use )THEN 
     543       
     544      cl_tmp=TRIM(fct_str(tl_bdy(jp_south)%t_seg(1)%i_index))//','//& 
     545         &   TRIM(fct_str(tl_bdy(jp_south)%t_seg(1)%i_first))//':'//& 
     546         &   TRIM(fct_str(tl_bdy(jp_south)%t_seg(1)%i_last))//& 
     547         &   '('//TRIM(fct_str(tl_bdy(jp_south)%t_seg(1)%i_width))//')' 
     548      DO ji=2,tl_bdy(jp_south)%i_nseg 
     549         cl_tmp=TRIM(cl_tmp)//'|'//& 
     550            &   TRIM(fct_str(tl_bdy(jp_south)%t_seg(ji)%i_index))//','//& 
     551            &   TRIM(fct_str(tl_bdy(jp_south)%t_seg(ji)%i_first))//':'//& 
     552            &   TRIM(fct_str(tl_bdy(jp_south)%t_seg(ji)%i_last)) 
     553      ENDDO 
     554 
     555      tl_att=att_init("bdy_south",TRIM(cl_tmp)) 
     556      CALL file_add_att(tl_fileout, tl_att) 
     557   ENDIF 
     558 
     559   IF( tl_bdy(jp_east)%l_use )THEN 
     560      ! add shift on east boundary 
     561      ! boundary compute on T point but express on U or V point 
     562      il_shift=1 
     563 
     564      cl_tmp=TRIM(fct_str(tl_bdy(jp_east)%t_seg(1)%i_index-il_shift))//','//& 
     565         &   TRIM(fct_str(tl_bdy(jp_east)%t_seg(1)%i_first))//':'//& 
     566         &   TRIM(fct_str(tl_bdy(jp_east)%t_seg(1)%i_last))//& 
     567         &   '('//TRIM(fct_str(tl_bdy(jp_east)%t_seg(1)%i_width))//')' 
     568      DO ji=2,tl_bdy(jp_east)%i_nseg 
     569         cl_tmp=TRIM(cl_tmp)//'|'//& 
     570            &   TRIM(fct_str(tl_bdy(jp_east)%t_seg(ji)%i_index-il_shift))//','//& 
     571            &   TRIM(fct_str(tl_bdy(jp_east)%t_seg(ji)%i_first))//':'//& 
     572            &   TRIM(fct_str(tl_bdy(jp_east)%t_seg(ji)%i_last)) 
     573      ENDDO 
     574 
     575      tl_att=att_init("bdy_east",TRIM(cl_tmp)) 
     576      CALL file_add_att(tl_fileout, tl_att) 
     577   ENDIF 
     578 
     579   IF( tl_bdy(jp_west)%l_use )THEN 
     580 
     581      cl_tmp=TRIM(fct_str(tl_bdy(jp_west)%t_seg(1)%i_index))//','//& 
     582         &   TRIM(fct_str(tl_bdy(jp_west)%t_seg(1)%i_first))//':'//& 
     583         &   TRIM(fct_str(tl_bdy(jp_west)%t_seg(1)%i_last))//& 
     584         &   '('//TRIM(fct_str(tl_bdy(jp_west)%t_seg(1)%i_width))//')' 
     585      DO ji=2,tl_bdy(jp_west)%i_nseg 
     586         cl_tmp=TRIM(cl_tmp)//'|'//& 
     587            &   TRIM(fct_str(tl_bdy(jp_west)%t_seg(ji)%i_index))//','//& 
     588            &   TRIM(fct_str(tl_bdy(jp_west)%t_seg(ji)%i_first))//':'//& 
     589            &   TRIM(fct_str(tl_bdy(jp_west)%t_seg(ji)%i_last)) 
     590      ENDDO 
     591 
     592      tl_att=att_init("bdy_west",TRIM(cl_tmp)) 
     593      CALL file_add_att(tl_fileout, tl_att) 
     594   ENDIF 
     595 
    512596   ! create file 
    513597   CALL iom_create(tl_fileout) 
     
    525609   CALL mpp_clean(tl_bathy0) 
    526610   DEALLOCATE(dl_weight) 
     611   CALL boundary_clean(tl_bdy(:)) 
    527612 
    528613   ! close log file 
     
    908993 
    909994      ! extrapolate variable 
    910       CALL extrap_fill_value( td_var, id_offset=id_offset(:,:), & 
    911       &                               id_rho=id_rho(:),         & 
    912       &                               id_iext=il_iext, id_jext=il_jext ) 
     995      CALL extrap_fill_value( td_var ) 
    913996 
    914997      ! interpolate Bathymetry 
Note: See TracChangeset for help on using the changeset viewer.