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 8862 for branches/2015/nemo_v3_6_STABLE – NEMO

Ignore:
Timestamp:
2017-11-30T16:58:49+01:00 (6 years ago)
Author:
jpaul
Message:

Bugs fix: see tickets #1989

Location:
branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN
Files:
1 added
23 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/README

    r6467 r8862  
    33(http://www.stack.nl/~dimitri/doxygen/index.html version 1.8.3.1 or upper) 
    44then 
    5    open ./TOOLS/SIREN/doc/html/index.html in your web browser  
     5   open ./TOOLS/SIREN/doc/html/index.html in your web browser 
    66or  
    7    run ./TOOLS/SIREN/doc/latex/gmake and open ./TOOLS/SIREN/doc/latex/refman.pdf  
     7   run gmake in ./TOOLS/SIREN/doc/latex directory and open ./TOOLS/SIREN/doc/latex/refman.pdf  
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/cfg/dummy.cfg

    r6392 r8862  
    11&namdum 
    2    cn_dumvar="" 
     2   cn_dumvar="orca_lon", "orca_lat", "time_instant", "time_centered" 
    33   cn_dumdim="" 
    44   cn_dumatt="history" 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg

    r6392 r8862  
    88nav_lev      | model_levels   | Z    | T | cubic           | Model levels                          |                                   
    99deptht       | m              | Z    | T |                 | Vertical T levels                     | depth                             
     10ncatice      | 1              | Z    | T |                 | Ice category                          | num_icecat_coordinate 
    1011time_counter |                | T    |   |                 | Time axis                             | time                              
    1112Bathymetry   | m              | XY   | T | cubic           | Bathymetry                            | bathymetry                        
     
    108109kz           |                | XYZT | T |                 |                                       |                                   
    109110irondep      |                | XYZT | T |                 |                                       |                                   
     111sivelu       | m/s            | XYT  | T |                 | Ice velocity along i-axis at I-point  | sea_ice_x_velocity 
     112sivelv       | m/s            | XYT  | T |                 | Ice velocity along j-axis at I-point  | sea_ice_y_velocity 
     113siconcat     | %              | XYZT | T |                 | Ice concentration for categories      | sea_ice_cat_concentration 
     114sithicat     | m              | XYZT | T |                 | Ice thickness for categories          | sea_ice_cat_icethickness 
     115snthicat     | m              | XYZT | T |                 | Snow thickness for categories         | sea_ice_cat_snowthickness 
    110116kt_ice       |                |      |   |                 |                                       |                                   
    111117hicif        |                |      |   |                 |                                       |                                   
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/attribute.f90

    r6392 r8862  
    141141   END TYPE TATT 
    142142 
    143    CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumatt !< dummy attribute 
     143   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumatt !< dummy attribute 
    144144 
    145145   INTERFACE att_init 
     
    12821282      ! loop indices 
    12831283      ! namelist 
    1284       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar 
    1285       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim 
    1286       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt 
     1284      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar 
     1285      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim 
     1286      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt 
    12871287 
    12881288      !---------------------------------------------------------------- 
     
    13451345 
    13461346      att_is_dummy=.FALSE. 
    1347       DO ji=1,ip_maxdum 
     1347      DO ji=1,ip_maxdumcfg 
    13481348         IF( fct_lower(td_att%c_name) == fct_lower(cm_dumatt(ji)) )THEN 
    13491349            att_is_dummy=.TRUE. 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/create_bathy.f90

    r6392 r8862  
    2222!> <br/>     
    2323!> \image html  bathy_40.png  
    24 !> \image latex bathy_30.png 
     24!> <center>\image latex bathy_30.png 
     25!> </center> 
    2526!> 
    2627!> @note  
     
    4546!>       - cn_varcfg : variable configuration file  
    4647!> (see ./SIREN/cfg/variable.cfg) 
     48!>       - cn_dimcfg : dimension configuration file. defines dimension allowed 
     49!> (see ./SIREN/cfg/dimension.cfg). 
    4750!>       - cn_dumcfg : useless (dummy) configuration file, for useless  
    4851!> dimension or variable (see ./SIREN/cfg/dummy.cfg). 
     
    133136!> @date February, 2016 
    134137!> - do not closed sea for east-west cyclic domain 
     138!> @date October, 2016 
     139!> - dimension to be used select from configuration file 
    135140! 
    136141!> @todo 
     
    218223   ! namcfg 
    219224   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg'  
     225   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg'  
    220226   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg'  
    221227 
     
    248254   NAMELIST /namcfg/ &   !< configuration namelist 
    249255   &  cn_varcfg, &       !< variable configuration file 
     256   &  cn_dimcfg, &       !< dimension configuration file 
    250257   &  cn_dumcfg          !< dummy configuration file 
    251258 
     
    307314      ! get variable extra information 
    308315      CALL var_def_extra(TRIM(cn_varcfg)) 
     316 
     317      ! get dimension allowed 
     318      CALL dim_def_extra(TRIM(cn_dimcfg)) 
    309319 
    310320      ! get dummy variable 
     
    614624   CALL mpp_clean(tl_coord1) 
    615625   CALL mpp_clean(tl_coord0) 
     626   CALL var_clean_extra() 
    616627 
    617628   ! close log file 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/create_boundary.F90

    r6392 r8862  
    2626!>  <br/>  
    2727!> \image html  boundary_NEATL36_70.png  
    28 !> \image latex boundary_NEATL36_70.png 
     28!> <center>\image latex boundary_NEATL36_70.png 
     29!> </center> 
    2930!> 
    3031!> @note  
     
    5152!>       - cn_varcfg : variable configuration file 
    5253!> (see ./SIREN/cfg/variable.cfg) 
     54!>       - cn_dimcfg : dimension configuration file. define dimensions allowed 
     55!> (see ./SIREN/cfg/dimension.cfg). 
    5356!>       - cn_dumcfg : useless (dummy) configuration file, for useless  
    5457!> dimension or variable (see ./SIREN/cfg/dummy.cfg). 
     
    161164!>             - cn_north='index1(width),first1:last1|index2,first2:last2' 
    162165!>             \image html  boundary_50.png  
    163 !>             \image latex boundary_50.png 
     166!>             <center>\image latex boundary_50.png 
     167!>             </center> 
    164168!>       - cn_south  : south boundary indices on fine grid 
    165169!>       - cn_east   : east  boundary indices on fine grid 
     
    198202!> @date January, 2016 
    199203!> - same process use for variable extracted or interpolated from input file. 
     204!> @date October, 2016 
     205!> - dimension to be used select from configuration file 
     206!> 
     207!> @todo 
     208!> - rewitre using meshmask instead of bathymetry and coordinates files. 
    200209!> 
    201210!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    383392 
    384393   ! namcfg 
    385    CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg'  
    386    CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg' 
     394   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg'  
     395   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg' 
     396   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg' 
    387397 
    388398   ! namcrs 
     
    445455   NAMELIST /namcfg/ &  !< config namelist 
    446456   &  cn_varcfg, &       !< variable configuration file 
     457   &  cn_dimcfg, &       !< dimension configuration file 
    447458   &  cn_dumcfg          !< dummy configuration file 
    448459 
     
    527538      CALL var_def_extra(TRIM(cn_varcfg)) 
    528539 
     540      ! get dimension allowed 
     541      CALL dim_def_extra(TRIM(cn_dimcfg)) 
     542 
    529543      ! get dummy variable 
    530544      CALL var_get_dummy(TRIM(cn_dumcfg)) 
     
    761775                  ENDIF 
    762776               ENDDO 
    763                 
     777 
    764778               ! clean 
    765779               CALL var_clean(tl_var1) 
     
    879893                        CALL dom_del_extra( tl_segvar1(jvar+jj,jk,jl), & 
    880894                        &                   tl_dom1 ) 
     895 
    881896                        ! clean extra point information on coarse grid domain 
    882897                        CALL dom_clean_extra( tl_dom0 ) 
     
    11511166   CALL mpp_clean(tl_coord1) 
    11521167   CALL mpp_clean(tl_coord0) 
     1168   CALL var_clean_extra() 
    11531169 
    11541170   CALL multi_clean(tl_multi) 
     
    13821398      CALL extrap_fill_value( td_var ) 
    13831399 
    1384       ! interpolate Bathymetry 
     1400      ! interpolate variable 
    13851401      CALL interp_fill_value( td_var, id_rho(:), & 
    13861402      &                       id_offset=id_offset(:,:) ) 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/create_coord.f90

    r6392 r8862  
    4444!>       - cn_varcfg : variable configuration file  
    4545!> (see ./SIREN/cfg/variable.cfg) 
     46!>       - cn_dimcfg : dimension configuration file. define dimensions allowed  
     47!> (see ./SIREN/cfg/dimension.cfg). 
    4648!>       - cn_dumcfg : useless (dummy) configuration file, for useless  
    4749!> dimension or variable (see ./SIREN/cfg/dummy.cfg). 
     
    7678!> 
    7779!>    * _nesting namelist (namnst)_:<br/> 
     80!>       you could define sub domain with coarse grid indices or with coordinates. 
     81!>       @note if coordinates defined, SIREN does not take into account indices. 
     82!> 
    7883!>       - in_imin0 : i-direction lower left  point indice  
    7984!> of coarse grid subdomain to be used 
     
    8489!>       - in_jmax0 : j-direction upper right point indice 
    8590!> of coarse grid subdomain to be used 
     91!>       - rn_lonmin0 : lower left  longitude of coarse grid subdomain to be used 
     92!>       - rn_lonmax0 : upper right longitude of coarse grid subdomain to be used 
     93!>       - rn_latmin0 : lower left  latitude  of coarse grid subdomain to be used 
     94!>       - rn_latmax0 : upper right latitude  of coarse grid subdomain to be used 
    8695!>       - in_rhoi  : refinement factor in i-direction 
    8796!>       - in_rhoj  : refinement factor in j-direction<br/> 
    8897!> 
    8998!>       \image html  grid_zoom_40.png  
    90 !>       \image latex grid_zoom_40.png 
     99!>       <center> \image latex grid_zoom_40.png  
     100!>       </center> 
    91101!> 
    92102!>    * _output namelist (namout)_: 
     
    102112!> @date September, 2015 
    103113!> - manage useless (dummy) variable, attributes, and dimension 
     114!> @date September, 2016 
     115!> - allow to use coordinate to define subdomain 
     116!> @date October, 2016 
     117!> - dimension to be used select from configuration file 
    104118!> 
    105119!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    139153   INTEGER(i4)                                          :: il_nvar 
    140154   INTEGER(i4)                                          :: il_ew 
     155   INTEGER(i4)                                          :: il_imin0 
     156   INTEGER(i4)                                          :: il_imax0 
     157   INTEGER(i4)                                          :: il_jmin0 
     158   INTEGER(i4)                                          :: il_jmax0 
     159 
    141160   INTEGER(i4)      , DIMENSION(ip_maxdim)              :: il_rho 
     161   INTEGER(i4)      , DIMENSION(2)                      :: il_index 
    142162   INTEGER(i4)      , DIMENSION(2,2,ip_npoint)          :: il_offset 
    143163 
     
    167187   ! namcfg 
    168188   CHARACTER(LEN=lc) :: cn_varcfg = './cfg/variable.cfg'  
     189   CHARACTER(LEN=lc) :: cn_dimcfg = './cfg/dimension.cfg'  
    169190   CHARACTER(LEN=lc) :: cn_dumcfg = './cfg/dummy.cfg' 
    170191 
     
    177198 
    178199   !namnst 
     200   REAL(sp)          :: rn_lonmin0 = -360. 
     201   REAL(sp)          :: rn_lonmax0 = -360. 
     202   REAL(sp)          :: rn_latmin0 = -360. 
     203   REAL(sp)          :: rn_latmax0 = -360. 
    179204   INTEGER(i4)       :: in_imin0 = 0 
    180205   INTEGER(i4)       :: in_imax0 = 0 
     
    195220   NAMELIST /namcfg/ &  !  config namelist 
    196221   &  cn_varcfg, &       !< variable configuration file 
     222   &  cn_dimcfg, &       !< dimension configuration file 
    197223   &  cn_dumcfg          !< dummy configuration file 
    198224 
     
    207233    
    208234   NAMELIST /namnst/ &  !  nesting namelist 
     235   &  rn_lonmin0, &     !< lower left  coarse grid longitude 
     236   &  rn_lonmax0, &     !< upper right coarse grid longitude 
     237   &  rn_latmin0, &     !< lower left  coarse grid latitude 
     238   &  rn_latmax0, &     !< upper right coarse grid latitude 
    209239   &  in_imin0,   &     !< i-direction lower left  point indice  
    210240   &  in_imax0,   &     !< i-direction upper right point indice 
     
    255285      CALL var_def_extra(TRIM(cn_varcfg)) 
    256286 
     287      ! get dimension allowed 
     288      CALL dim_def_extra(TRIM(cn_dimcfg)) 
     289 
    257290      ! get dummy variable 
    258291      CALL var_get_dummy(TRIM(cn_dumcfg)) 
     
    301334 
    302335   ! check nesting parameters 
    303    IF( in_imin0 < 0 .OR. in_imax0 < 0 .OR. in_jmin0 < 0 .OR. in_jmax0 < 0)THEN 
     336   il_index(:)=0 
     337   IF( rn_lonmin0 >= -180. .AND. rn_lonmin0 <= 360 .AND. & 
     338     & rn_latmin0 >= -90.  .AND. rn_latmin0 <= 90. )THEN 
     339 
     340      il_index(:)=grid_get_closest(tl_coord0, & 
     341         &                         REAL(rn_lonmin0,dp), REAL(rn_latmin0,dp), & 
     342         &                         cd_pos='ll')  
     343      il_imin0=il_index(1) 
     344      il_jmin0=il_index(2) 
     345   ELSE 
     346      il_imin0=in_imin0 
     347      il_jmin0=in_jmin0 
     348   ENDIF 
     349 
     350   il_index(:)=0 
     351   IF( rn_lonmax0 >= -180. .AND. rn_lonmax0 <= 360 .AND. & 
     352     & rn_latmax0 >= -90.  .AND. rn_latmax0 <= 90. )THEN 
     353 
     354      il_index(:)=grid_get_closest(tl_coord0, & 
     355         &                         REAL(rn_lonmax0,dp), REAL(rn_latmax0,dp), & 
     356         &                         cd_pos='ur')  
     357      il_imax0=il_index(1) 
     358      il_jmax0=il_index(2) 
     359   ELSE 
     360      il_imax0=in_imax0 
     361      il_jmax0=in_jmax0 
     362   ENDIF 
     363 
     364   ! forced indices for east west cyclic domain 
     365   IF( rn_lonmin0 == rn_lonmax0 .AND. & 
     366     & rn_lonmin0 /= -360. )THEN 
     367      il_imin0=0 
     368      il_imax0=0 
     369   ENDIF 
     370 
     371   IF( il_imin0 < 0 .OR. il_imax0 < 0 .OR. il_jmin0 < 0 .OR. il_jmax0 < 0)THEN 
    304372      CALL logger_fatal("CREATE COORD: invalid points indices."//& 
    305373      &  " check namelist "//TRIM(cl_namelist)) 
     
    318386 
    319387   ! check domain validity 
    320    CALL grid_check_dom(tl_coord0, in_imin0, in_imax0, in_jmin0, in_jmax0 ) 
     388   CALL grid_check_dom(tl_coord0, il_imin0, il_imax0, il_jmin0, il_jmax0 ) 
    321389 
    322390   ! compute domain 
    323391   tl_dom=dom_init( tl_coord0,         & 
    324    &                in_imin0, in_imax0,& 
    325    &                in_jmin0, in_jmax0 ) 
     392   &                il_imin0, il_imax0,& 
     393   &                il_jmin0, il_jmax0 ) 
    326394 
    327395   ! add extra band (if need be) to compute interpolation 
     
    425493   IF( il_attid == 0 )THEN 
    426494      il_ind=var_get_index(tl_fileout%t_var(:),'longitude') 
     495      IF( il_ind == 0 )THEN 
     496         il_ind=var_get_index(tl_fileout%t_var(:),'longitude_T') 
     497      ENDIF 
    427498      il_ew=grid_get_ew_overlap(tl_fileout%t_var(il_ind)) 
    428499      IF( il_ew >= 0 )THEN 
     
    447518 
    448519   CALL file_clean(tl_fileout) 
     520   CALL var_clean_extra() 
    449521 
    450522   ! close log file 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/create_restart.f90

    r6392 r8862  
    4848!>       - cn_varcfg : variable configuration file 
    4949!> (see ./SIREN/cfg/variable.cfg) 
     50!>       - cn_dimcfg : dimension configuration file. define dimensions allowed 
     51!> (see ./SIREN/cfg/dimension.cfg). 
    5052!>       - cn_dumcfg : useless (dummy) configuration file, for useless  
    5153!> dimension or variable (see ./SIREN/cfg/dummy.cfg). 
     
    6365!>    * _vertical grid namelist (namzgr)_:<br/> 
    6466!>       - dn_pp_to_be_computed  : 
    65 !>       - dn_ppsur              : 
    66 !>       - dn_ppa0               : 
    67 !>       - dn_ppa1               : 
    68 !>       - dn_ppa2               :  
    69 !>       - dn_ppkth              : 
    70 !>       - dn_ppkth2             : 
    71 !>       - dn_ppacr              : 
    72 !>       - dn_ppacr2             : 
    73 !>       - dn_ppdzmin            : 
    74 !>       - dn_pphmax             : 
     67!>       - dn_ppsur              : coefficient to compute vertical grid 
     68!>       - dn_ppa0               : coefficient to compute vertical grid 
     69!>       - dn_ppa1               : coefficient to compute vertical grid 
     70!>       - dn_ppa2               : double tanh function parameter 
     71!>       - dn_ppkth              : coefficient to compute vertical grid 
     72!>       - dn_ppkth2             : double tanh function parameter 
     73!>       - dn_ppacr              : coefficient to compute vertical grid 
     74!>       - dn_ppacr2             : double tanh function parameter 
     75!>       - dn_ppdzmin            : minimum vertical spacing 
     76!>       - dn_pphmax             : maximum depth 
    7577!>       - in_nlevel             : number of vertical level 
    7678!> 
    7779!>    * _partial step namelist (namzps)_:<br/> 
    78 !>       - dn_e3zps_min          : 
    79 !>       - dn_e3zps_rat          :  
     80!>       - dn_e3zps_min          : minimum thickness of partial step level (meters) 
     81!>       - dn_e3zps_rat          : minimum thickness ratio of partial step level 
    8082!> 
    8183!>    * _variable namelist (namvar)_:<br/> 
     
    158160!> @date September, 2015 
    159161!> - manage useless (dummy) variable, attributes, and dimension 
     162!> @date October, 2016 
     163!> - dimension to be used select from configuration file 
    160164!> 
    161165!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    196200   INTEGER(i4)                                        :: il_status 
    197201   INTEGER(i4)                                        :: il_fileid 
     202   INTEGER(i4)                                        :: il_attid 
    198203   INTEGER(i4)                                        :: il_nvar 
    199    INTEGER(i4)                                        :: il_attid 
    200204   INTEGER(i4)                                        :: il_imin1 
    201205   INTEGER(i4)                                        :: il_imax1 
     
    249253 
    250254   ! namcfg 
    251    CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg'  
    252    CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg' 
     255   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg'  
     256   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg' 
     257   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg' 
    253258 
    254259   ! namcrs 
     
    304309   NAMELIST /namcfg/ &  !< configuration namelist 
    305310   &  cn_varcfg, &      !< variable configuration file 
     311   &  cn_dimcfg, &      !< dimension configuration file 
    306312   &  cn_dumcfg         !< dummy configuration file 
    307313 
     
    309315   &  cn_coord0,  &     !< coordinate file 
    310316   &  in_perio0         !< periodicity index 
    311     
     317 
    312318   NAMELIST /namfin/ &  !< fine grid namelist 
    313319   &  cn_coord1,   &    !< coordinate file 
     
    336342   &  cn_varfile, &     !< list of variable file 
    337343   &  cn_varinfo        !< list of variable and interpolation method to be used. 
    338     
     344 
    339345   NAMELIST /namnst/ &  !< nesting namelist 
    340346   &  in_rhoi,    &     !< refinement factor in i-direction 
     
    387393      CALL var_def_extra(TRIM(cn_varcfg)) 
    388394 
     395      ! get dimension allowed 
     396      CALL dim_def_extra(TRIM(cn_dimcfg)) 
     397 
    389398      ! get dummy variable 
    390399      CALL var_get_dummy(TRIM(cn_dumcfg)) 
     
    402411      ! match variable with file 
    403412      tl_multi=multi_init(cn_varfile) 
    404        
     413  
    405414      READ( il_fileid, NML = namnst ) 
    406415      READ( il_fileid, NML = namout ) 
     
    592601               !- check grid coincidence 
    593602               IF( ll_sameGrid )THEN 
     603                  il_rho(:)=1 
    594604                  CALL grid_check_coincidence( tl_mpp, tl_coord1, & 
    595605                  &                            il_imin1, il_imax1, & 
     
    896906   CALL mpp_clean(tl_mppout) 
    897907   CALL mpp_clean(tl_coord1) 
     908   CALL var_clean_extra() 
    898909 
    899910   ! close log file 
     
    12001211            &        tl_depth%d_value(:,:,:,:) ) )THEN 
    12011212 
    1202                CALL logger_warn("CREATE BOUNDARY: depth value from "//& 
     1213               CALL logger_warn("CREATE RESTART: depth value from "//& 
    12031214               &  TRIM(td_mpp%c_name)//" not conform "//& 
    12041215               &  " to those from former file(s).") 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/dimension.f90

    r6392 r8862  
    156156!> @date Spetember, 2015 
    157157!> - manage useless (dummy) dimension 
     158!> @date October, 2016 
     159!> - dimension allowed read in configuration file 
    158160!> 
    159161!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    171173 
    172174   PRIVATE :: cm_dumdim        !< dummy dimension array 
     175   PRIVATE :: cm_dimX          !< x dimension array 
     176   PRIVATE :: cm_dimY          !< y dimension array 
     177   PRIVATE :: cm_dimZ          !< z dimension array 
     178   PRIVATE :: cm_dimT          !< t dimension array 
    173179 
    174180   ! function and subroutine 
     
    188194   PUBLIC :: dim_get_dummy     !< fill dummy dimension array 
    189195   PUBLIC :: dim_is_dummy      !< check if dimension is defined as dummy dimension 
     196   PUBLIC :: dim_def_extra     !< read dimension configuration file, and save dimension allowed. 
    190197 
    191198   PRIVATE :: dim__reshape_2xyzt_dp ! reshape real(8) 4D array to ('x','y','z','t') 
     
    203210   PRIVATE :: dim__copy_unit        ! copy dimension structure 
    204211   PRIVATE :: dim__copy_arr         ! copy array of dimension structure 
     212   PRIVATE :: dim__is_allowed 
    205213 
    206214   TYPE TDIM !< dimension structure 
     
    215223   END TYPE 
    216224 
    217    CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumdim !< dummy dimension 
     225   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumdim !< dummy dimension 
     226   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimX   !< x dimension 
     227   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimY   !< y dimension 
     228   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimZ   !< z dimension 
     229   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimT   !< t dimension 
    218230 
    219231   INTERFACE dim_print 
     
    587599         cl_name=fct_lower(cd_name) 
    588600 
    589          IF( TRIM(cl_name) == 'x' )THEN 
     601         IF(     dim__is_allowed(TRIM(cl_name), cm_dimX(:)) )THEN 
    590602            dim_init%c_sname='x' 
    591          ELSEIF( TRIM(cl_name) == 'y' )THEN 
     603         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimY(:)) )THEN 
    592604            dim_init%c_sname='y' 
    593          ELSEIF( TRIM(cl_name)== 'z' .OR. & 
    594          &       INDEX(cl_name,'depth')/=0 )THEN 
     605         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimZ(:)) )THEN 
    595606            dim_init%c_sname='z' 
    596          ELSEIF( TRIM(cl_name)== 't' .OR. & 
    597          &       INDEX(cl_name,'time')/=0 )THEN 
     607         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimT(:)) )THEN 
    598608            dim_init%c_sname='t' 
    599          ENDIF       
     609         ELSE 
     610            CALL logger_warn("DIM INIT: "//TRIM(cd_name)//& 
     611            " not allowed.") 
     612         ENDIF 
    600613 
    601614      ENDIF 
     
    14301443      ! loop indices 
    14311444      ! namelist 
    1432       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar 
    1433       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim 
    1434       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt 
     1445      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar 
     1446      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim 
     1447      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt 
    14351448 
    14361449      !---------------------------------------------------------------- 
     
    14931506 
    14941507      dim_is_dummy=.FALSE. 
    1495       DO ji=1,ip_maxdum 
     1508      DO ji=1,ip_maxdumcfg 
    14961509         IF( fct_lower(td_dim%c_name) == fct_lower(cm_dumdim(ji)) )THEN 
    14971510            dim_is_dummy=.TRUE. 
     
    15011514 
    15021515   END FUNCTION dim_is_dummy 
     1516   !------------------------------------------------------------------- 
     1517   !> @brief This subroutine read dimension configuration file,  
     1518   !> and fill array of dimension allowed. 
     1519   !> 
     1520   !> @author J.Paul 
     1521   !> @date Ocotber, 2016 - Initial Version 
     1522   ! 
     1523   !> @param[in] cd_file input file (dimension configuration file) 
     1524   !------------------------------------------------------------------- 
     1525   SUBROUTINE dim_def_extra( cd_file ) 
     1526      IMPLICIT NONE 
     1527 
     1528      ! Argument       
     1529      CHARACTER(LEN=*), INTENT(IN) :: cd_file 
     1530 
     1531      ! local variable 
     1532      INTEGER(i4)   :: il_fileid 
     1533      INTEGER(i4)   :: il_status 
     1534 
     1535      LOGICAL       :: ll_exist 
     1536       
     1537      ! loop indices 
     1538      ! namelist 
     1539      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimX = ''  
     1540      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimY = '' 
     1541      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimZ = '' 
     1542      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimT = '' 
     1543 
     1544      !---------------------------------------------------------------- 
     1545      NAMELIST /namdim/ &   !< dimension namelist 
     1546      &  cn_dimX, &       !< x dimension name allowed 
     1547      &  cn_dimY, &       !< y dimension name allowed 
     1548      &  cn_dimZ, &       !< z dimension name allowed 
     1549      &  cn_dimT          !< t dimension name allowed 
     1550 
     1551      !---------------------------------------------------------------- 
     1552 
     1553      ! init 
     1554      cm_dimX(:)='' 
     1555      cm_dimY(:)='' 
     1556      cm_dimZ(:)='' 
     1557      cm_dimT(:)='' 
     1558 
     1559      ! read config variable file 
     1560      INQUIRE(FILE=TRIM(cd_file), EXIST=ll_exist) 
     1561      IF( ll_exist )THEN 
     1562 
     1563         il_fileid=fct_getunit() 
     1564    
     1565         OPEN( il_fileid, FILE=TRIM(cd_file), & 
     1566         &                FORM='FORMATTED',       & 
     1567         &                ACCESS='SEQUENTIAL',    & 
     1568         &                STATUS='OLD',           & 
     1569         &                ACTION='READ',          & 
     1570         &                IOSTAT=il_status) 
     1571         CALL fct_err(il_status) 
     1572         IF( il_status /= 0 )THEN 
     1573            CALL logger_fatal("DIM GET DUMMY: opening "//TRIM(cd_file)) 
     1574         ENDIF 
     1575    
     1576         READ( il_fileid, NML = namdim ) 
     1577         cm_dimX(:)=cn_dimX(:) 
     1578         cm_dimY(:)=cn_dimY(:) 
     1579         cm_dimZ(:)=cn_dimZ(:) 
     1580         cm_dimT(:)=cn_dimT(:) 
     1581 
     1582         CLOSE( il_fileid ) 
     1583 
     1584      ELSE 
     1585 
     1586         CALL logger_fatal("DIM DEF EXTRA: can't find configuration"//& 
     1587            &              " file "//TRIM(cd_file)) 
     1588 
     1589      ENDIF          
     1590 
     1591   END SUBROUTINE dim_def_extra 
     1592   !------------------------------------------------------------------- 
     1593   !> @brief This function check if dimension is allowed, i.e defined  
     1594   !> in dimension configuraton file 
     1595   !> 
     1596   !> @author J.Paul 
     1597   !> @date OCTOber, 2016 - Initial Version 
     1598   ! 
     1599   !> @param[in] cd_name dimension name 
     1600   !> @param[in] cd_dim  array dimension name allowed 
     1601   !> @return true if dimension is allowed  
     1602   !------------------------------------------------------------------- 
     1603   FUNCTION dim__is_allowed(cd_name, cd_dim) 
     1604      IMPLICIT NONE 
     1605 
     1606      ! Argument 
     1607      CHARACTER(LEN=*),               INTENT(IN) :: cd_name 
     1608      CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: cd_dim 
     1609       
     1610      ! function 
     1611      LOGICAL :: dim__is_allowed 
     1612       
     1613      ! loop indices 
     1614      INTEGER(i4) :: ji 
     1615      !---------------------------------------------------------------- 
     1616 
     1617      dim__is_allowed=.FALSE. 
     1618      ji=1 
     1619      DO WHILE( TRIM(cd_dim(ji)) /= '' ) 
     1620         IF( TRIM(fct_lower(cd_name)) == TRIM(fct_lower(cd_dim(ji))) )THEN 
     1621            dim__is_allowed=.TRUE. 
     1622            EXIT 
     1623         ENDIF 
     1624         ji=ji+1 
     1625      ENDDO 
     1626 
     1627   END FUNCTION dim__is_allowed 
     1628 
    15031629END MODULE dim 
    15041630 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/docsrc/2_quickstart.md

    r7372 r8862  
    5959&namcfg 
    6060   cn_varcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg" 
     61   cn_dimcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/dimension.cfg" 
    6162/ 
    6263 
     
    8384/ 
    8485~~~~~~~~~~~ 
     86 
     87@note you could define sub domain with coarse grid indices or with coordinates. 
    8588 
    8689Let's get describe this namelist.<br/> 
     
    9093empty, as done here.<br/> This will create a log file named *create_coord.log* 
    9194 
    92 The **namcfg** sub-namelist defines where found SIREN configuration file.<br/> 
    93 This configuration file defines standard name, default interpolation method, 
     95The **namcfg** sub-namelist defines where found SIREN configuration files.<br/> 
     96- The variable configuration file defines standard name, default interpolation method, 
    9497axis,... to be used for some known variables.<br/> 
    9598Obviously, you could add other variables to those already list, in this file. 
    96  
    97 @note You could find the generic version of *variable.cfg* in the directory *NEMOGCM/TOOLS/SIREN/cfg*. 
     99- The dimension configuration file defines dimensions allowed. 
     100 
     101@note You could find the generic version of those configuration files in the directory *NEMOGCM/TOOLS/SIREN/cfg*. 
    98102 
    99103The **namcrs** sub-namelist set parameters of the wide 
    100 coordinates file,<br/> as path to find it, and NEMO periodicity of the wide grid.<br/> 
     104coordinates file, as path to find it, and NEMO periodicity of the wide grid.<br/> 
    101105 
    102106@note the NEMO periodicity could be choose between 0 to 6: 
     
    130134 
    131135The **namnst** sub-namelist defines the subdomain to be used as well as refinment factor.<br/> 
    132 @note Subdomain is defined by indices of the coarse/wide grid.<br/> 
    133136 
    134137<ul> 
    135 <li>you can select area quite every where (excepted too close from the North 
    136 pole), and use the refinment factor you want.</li> 
    137  
    138 ~~~~~~~~~~~ 
    139 &namvar 
     138<li> you could define sub domain with coarse grid indices</li>  
     139 
     140~~~~~~~~~~~ 
     141&namnst 
    140142   in_imin0 = 1070 
    141143   in_imax0 = 1072 
    142144   in_jmin0 = 607 
    143145   in_jmax0 = 609 
     146/ 
     147~~~~~~~~~~~ 
     148 
     149<li>or with coordinates</li> 
     150 
     151~~~~~~~~~~~ 
     152&namnst 
     153   rn_lonmin0 = -97.9  
     154   rn_lonmax0 = -62.3  
     155   rn_latmin0 =   7.7 
     156   rn_latmax0 =  30.8 
     157/ 
     158~~~~~~~~~~~ 
     159 
     160<li>you can select area quite every where (excepted too close from the North 
     161pole), and use the refinment factor you want.</li> 
     162 
     163~~~~~~~~~~~ 
     164&namnst 
     165   in_imin0 = 1070 
     166   in_imax0 = 1072 
     167   in_jmin0 = 607 
     168   in_jmax0 = 609 
    144169 
    145170   in_rhoi = 2 
     
    148173~~~~~~~~~~~ 
    149174@image html grid_zoom_60.png 
    150 @image latex grid_zoom_40.png 
     175<center>@image latex grid_zoom_40.png 
     176</center> 
    151177<!-- @note ghost cells all around the grid are not shown here. --> 
    152178 
     179 
     180 
    153181<li>you can select area crossing the east-west overlap of the global ORCA grid.</li> 
    154182 
    155183~~~~~~~~~~~ 
    156 &namvar           
     184&namnst           
    157185   in_imin0 = 1402  
    158186   in_imax0 = 62 
     
    165193~~~~~~~~~~~ 
    166194@image html grid_glob_over_30.png 
    167 @image latex grid_glob_over_20.png 
     195<center>@image latex grid_glob_over_20.png 
     196</center> 
    168197<!-- @note in blue, the east-west overlap band of ORCA grid. --> 
    169198 
     
    171200 
    172201~~~~~~~~~~~ 
    173 &namvar 
     202&namnst 
    174203   in_imin0 = 0 
    175204   in_imax0 = 0 
     
    182211~~~~~~~~~~~ 
    183212@image html grid_glob_band_30.png 
    184 @image latex grid_glob_band_20.png 
     213<center>@image latex grid_glob_band_20.png 
     214</center> 
    185215 
    186216</ul> 
     
    215245&namcfg 
    216246   cn_varcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg" 
     247   cn_dimcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/dimension.cfg" 
    217248/ 
    218249 
     
    249280coordinates file.<br/> 
    250281@note in all SIREN namelist: <br/> 
    251 0 referred to the coarse/wide grid.<br/> 
    252 1 referred to the fine grid. 
     282**0** referred to the coarse/wide grid.<br/> 
     283**1** referred to the fine grid. 
    253284 
    254285In the same way, the **namfin** sub-namelist  set parameters of the fine 
    255286coordinates file.<br/> 
    256287@note in this namelist example, there is no need to set the variable *in_perio1* to define the NEMO 
    257 periodicity of the fine grid.<br/> Indeed, if this variable is not inform, SIREN tries to read it in the attributes of the file.<br/>  
    258 So if you created the fine coordinates with SIREN, you do not have to 
     288periodicity of the fine grid. Indeed, if this variable is not inform, SIREN tries to read it  
     289in the global attributes of the file. So if you created the fine coordinates with SIREN, you do not have to 
    259290fill it. In other case, you should add it to the namelist. 
    260291 
     
    296327# Merge bathymetry file # {#merge} 
    297328 
    298 The Bathymetry you build differs from the wider one.<br/> 
     329The Bathymetry you build, may differ from the wider one.<br/> 
    299330To avoid issue with boundaries forcing fields, you should merge fine and coarse Bathymetry on boundaries.<br/> 
    300331SIREN allows you to do this.<br/> 
     
    312343&namcfg 
    313344   cn_varcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg" 
     345   cn_dimcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/dimension.cfg" 
    314346/ 
    315347 
     
    348380 
    349381The **nambdy** sub-namelist defines the subdomain boundaries.<br/> 
    350 By default SIREN tries to create boundaries for each side. Boundary exist if there is at least one sea point on the second row of each side.<br/> 
    351 So you could let this namelist empty. 
    352  
     382By default SIREN tries to create boundaries for each side. Boundary exist if there is at least one sea point on the second row of each side. So you could let this namelist empty. 
    353383@sa For more information about boundaries, see @ref boundary 
    354384 
     
    365395time step). Or you could start from "partial" information about ocean state (Temperature and Salinity for example). 
    366396 
    367 Siren allows you to create both of those initial state.<br/> 
     397SIREN allows you to create both of those initial state.<br/> 
    368398To create the initial state, you have to run:<br/> 
    369399~~~~~~~~~~~~~~~~~~ 
     
    372402 
    373403Here after is an example of namelist for *create_restart.exe*.<br/> 
    374 In this example, you create an initial state split on 81 "processors", and named restar_out.nc.<br/> 
     404In this example, you create an initial state split on 81 "processors", and named restart_out.nc.<br/> 
    375405The initial state is composed of temperature and salinity refined from an extraction of GLORYS fields. 
    376406~~~~~~~~~~~~~~~~~~ 
     
    380410&namcfg 
    381411   cn_varcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg" 
     412   cn_dimcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/dimension.cfg" 
    382413/ 
    383414 
     
    479510&namcfg 
    480511   cn_varcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg" 
     512   cn_dimcfg = "PATH/NEMOGCM/TOOLS/SIREN/cfg/dimension.cfg" 
    481513/ 
    482514 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/docsrc/5_changeLog.md

    r7372 r8862  
    33@tableofcontents 
    44 
    5 # Release 2016-11-28 
     5# Release $Date:: 2016-11-16 #$ ($Revision: 7235 $) 
    66 
     7## New Features 
     8- merge_bathy.f90: allow to choose the number of boundary point with coarse grid value. 
     9- dimension.f90: dimension allowed read in configuration file. 
     10- variable.f90: allow to add scalar value. 
    711## Changes 
    8 ## New Features 
     12- create_coord.f90: allow to define sub domain with coarse grid indices or coordinates. 
     13- grid.f90:grid__get_closest_str: add function to get closest grid point using coarse grid coordinates strucutre. 
     14- iom_cdf.f90:iom_cdf__get_info: define cdf4 as cdf. 
     15- variable.f90: add subroutine to clean global array of extra information, and define logical for variable to be used. 
     16- create_coord.f90: dimension to be used select from configuration file. 
     17- create_bathy.f90: dimension to be used select from configuration file. 
     18- merge_bathy.f90: dimension to be used select from configuration file. 
     19- create_boundary.f90: dimension to be used select from configuration file. 
     20- create_restart.f90: dimension to be used select from configuration file. 
    921## Bug fixes 
    10  - boundary.f90: take into account that boundaries are compute on T point, but expressed on U,V point 
    11  - iom_cdf.f90: define type cdf4 as cdf 
     22- boundary.f90:boundary_check: take into account that boundaries are compute on T point, but expressed on U,V point. 
     23- grid.f90:grid__get_closest_str: use max of zero and east-west overlap instead of east-west overlap. 
     24- mpp.f90: compare index to td_lay number of proc instead of td_mpp (bug fix) . 
     25- iom_cdf.f90 : check if attribute cl_value is not bug (in read file) 
    1226 
    13 release (2016-07-01) 
     27# Release 2016-07-01 
    1428 
    1529## Changes 
     
    1832 - correct check of boundary indices 
    1933 
    20 # Release 
    21 Initial release (2016-04-11) 
     34# Initial Release 2016-04-11 
    2235 
    2336 <HR> 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/docsrc/6_perio.md

    r6468 r8862  
    66<dd>ghost cells (solid walls) are imposed at all model boundaries.</dd>  
    77@image html perio0_20.png  
    8 @latexonly 
    9 \begin{center} 
    10 \includegraphics{perio0_20.png} 
    11 \end{center} 
    12 @endlatexonly 
     8<center>@image latex perio0_20.png  
     9</center> 
    1310<dt>cyclic east-west boundary (in_perio=1)</dt> 
    1411<dd>first and last rows are closed, whilst the first column is set to the value of the last-but-one column and the last column to the value of the second one.</dd>   
    1512@image html perio1_20.png  
    16 @latexonly 
    17 \begin{center} 
    18 \includegraphics{perio1_20.png} 
    19 \end{center} 
    20 @endlatexonly 
     13<center>@image latex perio1_20.png  
     14</center> 
    2115<dt>symmetric boundary condition across the equator. (in_perio=2)</dt> 
    2216<dd>last row, and first and last columns are closed. </dd>  
    2317@image html perio2_20.png  
    24 @latexonly 
    25 \begin{center} 
    26 \includegraphics{perio2_20.png} 
    27 \end{center} 
    28 @endlatexonly 
     18<center>@image latex perio2_20.png  
     19</center> 
    2920<dt>North fold boundary with a T -point pivot (in_perio=3)</dt> 
    3021<dd>first row, and first and last columns are closed. </dd>  
    3122@image html perio3_20.png  
    32 @latexonly 
    33 \begin{center} 
    34 \includegraphics{perio3_20.png} 
    35 \end{center} 
    36 @endlatexonly 
     23<center>@image latex perio3_20.png  
     24</center> 
    3725<dt>North fold boundary with a T -point pivot and cyclic east-west boundary (in_perio=4)</dt> 
    3826<dd>first row is closed. The first column is set to the value of the last-but-one column and the last column to the value of the second one. </dd>  
    3927@image html perio4_20.png  
    40 @latexonly 
    41 \begin{center} 
    42 \includegraphics{perio4_20.png} 
    43 \end{center} 
    44 @endlatexonly 
     28<center>@image latex perio4_20.png  
     29</center> 
    4530<dt>North fold boundary with a F -point pivot (in_perio=5)</dt> 
    4631<dd>first row, and first and last columns are closed. </dd>  
    4732@image html perio5_20.png  
    48 @latexonly 
    49 \begin{center} 
    50 \includegraphics{perio5_20.png} 
    51 \end{center} 
    52 @endlatexonly 
     33<center>@image latex perio5_20.png  
     34</center> 
    5335<dt>North fold boundary with a F -point pivot and cyclic east-west boundary (in_perio=6)</dt> 
    5436<dd>first row is closed. The first column is set to the value of the last-but-one column and the last column to the value of the second one.</dd>  
    5537@image html perio6_20.png  
    56 @image html perio5_20.png  
    57 @latexonly 
    58 \begin{center} 
    59 \includegraphics{perio6_20.png} 
    60 \end{center} 
    61 @endlatexonly 
     38<center>@image latex perio6_20.png  
     39</center> 
    6240</dl> 
    6341@sa For more information about NEMO periodicity, see _Model Boundary Condition_ chapter in [NEMO documentation](http://www.nemo-ocean.eu/About-NEMO/Reference-manuals)) 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/global.f90

    r6392 r8862  
    6767 
    6868   INTEGER(i4)                             , PARAMETER :: ip_maxvar =200   !< maximum number of variable 
    69    INTEGER(i4)                             , PARAMETER :: ip_maxmtx =100   !< matrix variable maximum dimension (cf create_bathy) 
    70    INTEGER(i4)                             , PARAMETER :: ip_maxseg =50    !< maximum number of segment for each boundary 
     69   INTEGER(i4)                             , PARAMETER :: ip_maxmtx =50    !< matrix variable maximum dimension (cf create_bathy) 
     70   INTEGER(i4)                             , PARAMETER :: ip_maxseg =10    !< maximum number of segment for each boundary 
    7171 
    7272   INTEGER(i4)                             , PARAMETER :: ip_nsep=2        !< number of separator listed 
     
    101101   REAL(dp)                                , PARAMETER :: dp_fill_i4=NF90_FILL_INT    !< INT fill value 
    102102   REAL(dp)                                , PARAMETER :: dp_fill_sp=NF90_FILL_FLOAT  !< real fill value 
    103    REAL(dp)                                , PARAMETER :: dp_fill=NF90_FILL_DOUBLE !< double fill value 
     103   REAL(dp)                                , PARAMETER :: dp_fill=NF90_FILL_DOUBLE    !< double fill value 
    104104 
    105105   INTEGER(i4)                             , PARAMETER :: ip_npoint=4 
     
    112112 
    113113 
     114   INTEGER(i4)                             , PARAMETER :: ip_maxdimcfg=10 !< maximum allowed dimension in configuration file 
    114115   INTEGER(i4)                             , PARAMETER :: ip_maxdim=4 
    115116   INTEGER(i4)                             , PARAMETER :: jp_I=1 
     
    131132   INTEGER(i4), PARAMETER :: jp_west =4 
    132133 
    133    INTEGER(i4)                             , PARAMETER :: ip_maxdum = 10 !< maximum dummy variable, dimension, attribute 
     134   INTEGER(i4)                             , PARAMETER :: ip_maxdumcfg = 10 !< maximum dummy variable, dimension, or attribute  
     135                                                                            !< in configuration file 
    134136 
    135137END MODULE global 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/grid.f90

    r7372 r8862  
    218218!> @date February, 2015 
    219219!> - add function grid_fill_small_msk to fill small domain inside bigger one 
    220 !> @February, 2016 
     220!> @date February, 2016 
    221221!> - improve way to check coincidence (bug fix) 
    222222!> - manage grid cases for T,U,V or F point, with even or odd refinment (bug fix) 
     223!> @date April, 2016 
     224!> - add function to get closest grid point using coarse grid coordinates strucutre  
    223225! 
    224226!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    271273   PRIVATE :: grid__get_coarse_index_cc ! - using coarse and fine grid array of lon,lat 
    272274 
     275                                     ! return closest coarse grid point from another point 
     276   PRIVATE :: grid__get_closest_str    ! - using coarse grid coordinates strucutre 
     277   PRIVATE :: grid__get_closest_arr    ! - using coarse grid array of lon,lat 
     278 
    273279                                     ! get offset between fine and coarse grid 
    274280   PRIVATE :: grid__get_fine_offset_ff ! - using coarse and fine grid coordinates files 
     
    333339      MODULE PROCEDURE grid__get_ghost_mpp 
    334340   END INTERFACE  grid_get_ghost 
     341 
     342   INTERFACE  grid_get_closest 
     343      MODULE PROCEDURE grid__get_closest_str 
     344      MODULE PROCEDURE grid__get_closest_arr 
     345   END INTERFACE  grid_get_closest 
    335346 
    336347   INTERFACE  grid_get_coarse_index 
     
    467478   !------------------------------------------------------------------- 
    468479   !> @brief This subroutine get information about global domain, given mpp 
    469    !> strucutre. 
     480   !> structure. 
    470481   !> 
    471482   !> @details 
     
    536547 
    537548      SELECT CASE(il_perio) 
    538       CASE(3,4) 
    539          il_pivot=1 
    540       CASE(5,6) 
    541          il_pivot=0 
    542       CASE(0,1,2) 
    543          il_pivot=1 
     549         CASE(3,4) 
     550            il_pivot=1 
     551         CASE(5,6) 
     552            il_pivot=0 
     553         CASE(0,1,2) 
     554            il_pivot=1 
    544555      END SELECT 
    545556 
     
    13651376            END SELECT 
    13661377         ELSE 
     1378            il_perio=-1 
    13671379            ! check periodicity 
    13681380            IF(ANY(td_var%d_value(   1     ,:,1,1)/=td_var%d_fill).OR.& 
     
    16561668   !> else return the size of the ovarlap band. 
    16571669   !> East-West overlap is computed comparing longitude value of the   
    1658    !> South" part of the domain, to avoid  north fold boundary. 
     1670   !> South part of the domain, to avoid  north fold boundary. 
    16591671   !> 
    16601672   ! 
     
    16631675   !> @date October, 2014 
    16641676   !> - work on mpp file structure instead of file structure 
     1677   !> @date October, 2016 
     1678   !> - check longitude as longname 
    16651679   !> 
    16661680   !> @param[in] td_lon longitude variable structure  
     
    17121726            ALLOCATE( dl_vare(il_jmax-il_jmin+1) ) 
    17131727            ALLOCATE( dl_varw(il_jmax-il_jmin+1) ) 
    1714              
     1728 
    17151729            dl_vare(:)=dl_value(il_east,il_jmin:il_jmax) 
    17161730            dl_varw(:)=dl_value(il_west,il_jmin:il_jmax) 
    1717              
    1718             IF( .NOT.(  ALL(dl_vare(:)==td_var%d_fill) .AND. & 
    1719             &           ALL(dl_varw(:)==td_var%d_fill) ) )THEN 
    1720           
    1721                IF( TRIM(td_var%c_stdname) == 'longitude' )THEN 
     1731 
     1732            IF( .NOT.( ALL(dl_vare(:)==td_var%d_fill) .AND. & 
     1733            &          ALL(dl_varw(:)==td_var%d_fill) ) )THEN 
     1734 
     1735               IF( TRIM(td_var%c_stdname) == 'longitude' .OR. & 
     1736                 & SCAN( TRIM(td_var%c_longname), 'longitude') == 0 )THEN 
    17221737                  WHERE( dl_value(:,:) > 180._dp .AND. & 
    17231738                  &      dl_value(:,:) /= td_var%d_fill )  
     
    17431758                     ELSE 
    17441759                        dl_vare(:)=dl_value(il_east-ji,il_jmin:il_jmax) 
    1745                          
     1760 
    17461761                        IF( ALL( dl_varw(:) == dl_vare(:) ) )THEN 
    17471762                           grid__get_ew_overlap_var=ji+1 
     
    17691784   !> else return the size of the ovarlap band. 
    17701785   !> East-West overlap is computed comparing longitude value of the   
    1771    !> South" part of the domain, to avoid  north fold boundary. 
     1786   !> South part of the domain, to avoid  north fold boundary. 
    17721787   !> 
    17731788   !> @author J.Paul 
    17741789   !> @date October, 2014 - Initial Version 
     1790   !> @date October, 2016 
     1791   !> - check varid for longitude_T 
    17751792   !> 
    17761793   !> @param[in] td_file file structure  
     
    17931810      !---------------------------------------------------------------- 
    17941811 
    1795       il_varid=var_get_index(td_file%t_var(:), 'longitude') 
     1812      il_varid=var_get_id(td_file%t_var(:), 'longitude', 'longitude_T') 
    17961813      IF( il_varid /= 0 )THEN 
    17971814         ! read longitude on boundary 
    1798          tl_var=iom_read_var(td_file, 'longitude') 
     1815         tl_var=iom_read_var(td_file, il_varid) 
    17991816      ELSE 
    18001817         DO ji=1,td_file%i_nvar 
     
    18191836   !> else return the size of the ovarlap band. 
    18201837   !> East-West overlap is computed comparing longitude value of the   
    1821    !> South" part of the domain, to avoid  north fold boundary. 
     1838   !> South part of the domain, to avoid  north fold boundary. 
    18221839   !> 
    18231840   ! 
     
    18261843   !> @date October, 2014 
    18271844   !> - work on mpp file structure instead of file structure 
     1845   !> @date October, 2016 
     1846   !> - check varid for longitude_T 
    18281847   !> 
    18291848   !> @param[in] td_mpp mpp structure  
     
    18501869 
    18511870      ! read longitude on boundary 
    1852       il_varid=var_get_index(td_mpp%t_proc(1)%t_var(:),'longitude') 
     1871      il_varid=var_get_id(td_mpp%t_proc(1)%t_var(:),'longitude', 'longitude_T') 
    18531872      IF( il_varid /= 0 )THEN 
    1854          tl_var=iom_mpp_read_var(td_mpp, 'longitude') 
     1873         tl_var=iom_mpp_read_var(td_mpp, il_varid) 
    18551874      ELSE 
    18561875         DO ji=1,td_mpp%t_proc(1)%i_nvar 
     
    18661885         grid__get_ew_overlap_mpp=il_ew 
    18671886      ENDIF 
    1868  
    18691887 
    18701888      ! clean 
     
    30203038   !> 
    30213039   !> @author J.Paul 
     3040   !> @date April, 2016 - Initial Version 
     3041   !> @date October, 2016 
     3042   !> - use max of zero and east-west overlap instead of east-west overlap 
     3043   !> 
     3044   !> @param[in] td_coord0 coarse grid coordinate mpp structure 
     3045   !> @param[in] dd_lon1   fine   grid longitude 
     3046   !> @param[in] dd_lat1   fine   grid latitude 
     3047   !> @param[in] cd_pos    relative position of grid point from point  
     3048   !> @param[in] dd_fill   fill value 
     3049   !> @return coarse grid indices of closest point of fine grid point 
     3050   !------------------------------------------------------------------- 
     3051   FUNCTION grid__get_closest_str( td_coord0, dd_lon1, dd_lat1, cd_pos, dd_fill ) & 
     3052   &  RESULT(id_res) 
     3053 
     3054      IMPLICIT NONE 
     3055      ! Argument 
     3056      TYPE(TMPP )     , INTENT(IN) :: td_coord0 
     3057      REAL(dp),         INTENT(IN) :: dd_lon1 
     3058      REAL(dp),         INTENT(IN) :: dd_lat1 
     3059      CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: cd_pos 
     3060      REAL(dp),         INTENT(IN), OPTIONAL :: dd_fill 
     3061 
     3062      ! function 
     3063      INTEGER(i4), DIMENSION(2) :: id_res 
     3064 
     3065      ! local variable 
     3066      CHARACTER(LEN=lc)                        :: cl_point 
     3067      CHARACTER(LEN=lc)                        :: cl_name 
     3068 
     3069      INTEGER(i4)                              :: il_ind 
     3070      INTEGER(i4)                              :: il_ew 
     3071 
     3072      REAL(dp)   , DIMENSION(:,:), ALLOCATABLE :: dl_lon0 
     3073      REAL(dp)   , DIMENSION(:,:), ALLOCATABLE :: dl_lat0 
     3074 
     3075      TYPE(TVAR)                               :: tl_lon0 
     3076      TYPE(TVAR)                               :: tl_lat0 
     3077      TYPE(TMPP)                               :: tl_coord0 
     3078      !---------------------------------------------------------------- 
     3079 
     3080      id_res(:)=-1 
     3081      cl_point='T' 
     3082 
     3083      ! copy structure 
     3084      tl_coord0=mpp_copy(td_coord0) 
     3085 
     3086      IF( .NOT. ASSOCIATED(tl_coord0%t_proc) )THEN 
     3087 
     3088         CALL logger_error("GRID GET CLOSEST: decompsition of mpp "//& 
     3089         &  "file "//TRIM(tl_coord0%c_name)//" not defined." ) 
     3090 
     3091      ELSE 
     3092 
     3093         ! open mpp files 
     3094         CALL iom_mpp_open(tl_coord0) 
     3095  
     3096         ! read coarse longitue and latitude 
     3097         WRITE(cl_name,*) 'longitude_'//TRIM(cl_point) 
     3098         il_ind=var_get_id(tl_coord0%t_proc(1)%t_var(:), cl_name) 
     3099         IF( il_ind == 0 )THEN 
     3100            CALL logger_warn("GRID GET CLOSEST: no variable "//& 
     3101            &  TRIM(cl_name)//"in file "//TRIM(tl_coord0%c_name)//". & 
     3102            &  try to use longitude.") 
     3103            WRITE(cl_name,*) 'longitude' 
     3104         ENDIF 
     3105         tl_lon0=iom_mpp_read_var(tl_coord0, TRIM(cl_name)) 
     3106  
     3107         WRITE(cl_name,*) 'latitude_'//TRIM(cl_point) 
     3108         il_ind=var_get_id(tl_coord0%t_proc(1)%t_var(:), cl_name) 
     3109         IF( il_ind == 0 )THEN 
     3110            CALL logger_warn("GRID GET CLOSEST: no variable "//& 
     3111            &  TRIM(cl_name)//"in file "//TRIM(tl_coord0%c_name)//". & 
     3112            &  try to use latitude.") 
     3113            WRITE(cl_name,*) 'latitude' 
     3114         ENDIF 
     3115         tl_lat0=iom_mpp_read_var(tl_coord0, TRIM(cl_name)) 
     3116 
     3117         ! close mpp files 
     3118         CALL iom_mpp_close(tl_coord0) 
     3119 
     3120         il_ew=MAX(0,tl_coord0%i_ew) 
     3121         ALLOCATE(dl_lon0(tl_coord0%t_dim(jp_I)%i_len-il_ew, & 
     3122            &             tl_coord0%t_dim(jp_J)%i_len) )              
     3123         ALLOCATE(dl_lat0(tl_coord0%t_dim(jp_I)%i_len-il_ew, & 
     3124            &             tl_coord0%t_dim(jp_J)%i_len) ) 
     3125 
     3126         dl_lon0(:,:)=tl_lon0%d_value(il_ew+1:,:,1,1) 
     3127         dl_lat0(:,:)=tl_lat0%d_value(il_ew+1:,:,1,1) 
     3128 
     3129         id_res(:)=grid_get_closest( dl_lon0, dl_lat0, dd_lon1, dd_lat1, cd_pos, dd_fill ) 
     3130 
     3131         DEALLOCATE(dl_lon0, dl_lat0) 
     3132         CALL var_clean(tl_lon0) 
     3133         CALL var_clean(tl_lat0) 
     3134         CALL mpp_clean(tl_coord0) 
     3135 
     3136      ENDIF 
     3137 
     3138   END FUNCTION  grid__get_closest_str 
     3139   !------------------------------------------------------------------- 
     3140   !> @brief This function return grid indices of the closest point 
     3141   !> from point (lon1,lat1)  
     3142   !>  
     3143   !> @details 
     3144   !> 
     3145   !> @note overlap band should have been already removed from coarse grid array  
     3146   !> of longitude and latitude, before running this function 
     3147   !> 
     3148   !> if you add cd_pos argument, you could choice to return closest point at 
     3149   !> - lower left  (ll) of the point 
     3150   !> - lower right (lr) of the point 
     3151   !> - upper left  (ul) of the point 
     3152   !> - upper right (ur) of the point 
     3153   !> - lower       (lo) of the point 
     3154   !> - upper       (up) of the point 
     3155   !> -       left  (le) of the point 
     3156   !> -       right (ri) of the point 
     3157   !> 
     3158   !> @author J.Paul 
    30223159   !> @date November, 2013 - Initial Version 
    30233160   !> @date February, 2015 
     
    30343171   !> @return coarse grid indices of closest point of fine grid point 
    30353172   !------------------------------------------------------------------- 
    3036    FUNCTION grid_get_closest( dd_lon0, dd_lat0, dd_lon1, dd_lat1, cd_pos, dd_fill ) 
     3173   FUNCTION grid__get_closest_arr( dd_lon0, dd_lat0, dd_lon1, dd_lat1, cd_pos, dd_fill ) 
    30373174      IMPLICIT NONE 
    30383175      ! Argument 
     
    30453182 
    30463183      ! function 
    3047       INTEGER(i4), DIMENSION(2) :: grid_get_closest 
     3184      INTEGER(i4), DIMENSION(2) :: grid__get_closest_arr 
    30483185 
    30493186      ! local variable 
     
    32613398         END SELECT 
    32623399      ENDIF 
    3263       grid_get_closest(:)=MINLOC(dl_dist(:,:),dl_dist(:,:)/=NF90_FILL_DOUBLE) 
    3264  
    3265       grid_get_closest(1)=grid_get_closest(1)+il_iinf-1 
    3266       grid_get_closest(2)=grid_get_closest(2)+il_jinf-1 
     3400      grid__get_closest_arr(:)=MINLOC(dl_dist(:,:),dl_dist(:,:)/=NF90_FILL_DOUBLE) 
     3401 
     3402      grid__get_closest_arr(1)=grid__get_closest_arr(1)+il_iinf-1 
     3403      grid__get_closest_arr(2)=grid__get_closest_arr(2)+il_jinf-1 
    32673404 
    32683405      DEALLOCATE( dl_dist ) 
    32693406      DEALLOCATE( dl_lon0 ) 
    32703407 
    3271    END FUNCTION grid_get_closest 
     3408   END FUNCTION grid__get_closest_arr 
    32723409   !------------------------------------------------------------------- 
    32733410   !> @brief This function compute the distance between a point A and grid points.   
     
    34753612         ENDIF 
    34763613         tl_lat0=iom_mpp_read_var(tl_coord0, TRIM(cl_name)) 
    3477           
     3614 
    34783615         ! close mpp files 
    34793616         CALL iom_mpp_close(tl_coord0) 
     
    46474784 
    46484785      IF( ll_even )THEN 
     4786 
    46494787         ! look for variable value on domain for F point 
    46504788         il_ind=var_get_index(tl_coord0%t_proc(1)%t_var(:), 'longitude_F') 
     
    51125250      dl_lon1 = dd_lon1(il_imin1, il_jmax1) 
    51135251      dl_lat1 = dd_lat1(il_imin1, il_jmax1) 
    5114  
    51155252 
    51165253      IF( (ABS(dl_lon1-dl_lon0)>dp_delta) .AND. (dl_lon1 < dl_lon0) .OR. & 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/iom.f90

    r7372 r8862  
    157157   !> @author J.Paul 
    158158   !> @date November, 2013 - Initial Version 
    159    ! 
     159   !> 
    160160   !> @param[inout] td_file file structure 
    161161   !------------------------------------------------------------------- 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/iom_cdf.f90

    r7372 r8862  
    316316   !> @author J.Paul 
    317317   !> @date November, 2013 - Initial Version 
     318   !> @date October, 2016 
     319   !> - define cdf4 as cdf. 
    318320   ! 
    319321   !> @param[inout] td_file   file structure 
     
    340342            td_file%c_type='cdf' 
    341343         CASE(nf90_format_netcdf4, nf90_format_netcdf4_classic) 
     344            !td_file%c_type='cdf4' 
    342345            td_file%c_type='cdf' 
    343             !td_file%c_type='cdf4' 
    344346      END SELECT 
    345347      CALL logger_debug("IOM CDF GET INFO: type "//TRIM(td_file%c_type))  
     
    353355   !> reorder dimension to ('x', 'y', 'z', 't'). 
    354356   !> The dimension structure inside file structure is then completed. 
    355    ! 
    356    !> @author J.Paul 
    357    !> @date November, 2013 - Initial Version 
    358    ! 
     357   !> 
     358   !> @author J.Paul 
     359   !> @date November, 2013 - Initial Version 
     360   !> @date October, 2016 
     361   !> - check unknown dimension 
     362   !> 
    359363   !> @param[inout] td_file   file structure 
    360364   !------------------------------------------------------------------- 
     
    377381 
    378382      IF( td_file%i_ndim > 0 )THEN 
     383 
    379384         ii=1 
    380385         DO ji = 1, td_file%i_ndim 
    381386            ! read dimension information 
    382387            tl_dim=iom_cdf_read_dim( td_file, ji) 
    383             IF( .NOT. dim_is_dummy(tl_dim) )THEN 
     388            ! sname == 'u' if dimension is unknown (not to be used) 
     389            IF( TRIM(tl_dim%c_sname) /= 'u' )THEN 
    384390               IF( ii > ip_maxdim )THEN 
    385391                  CALL logger_fatal("IOM CDF OPEN: too much dimension "//& 
    386                   & "to be read. you should remove dummy dimension using "//& 
     392                  & "to be read. you could choose dimension to be used. see "//& 
    387393                  & " configuration file") 
    388394               ENDIF 
     
    397403            &  " IOM CDF GET FILE DIM: there is no unlimited dimension in file "//& 
    398404            &  TRIM(td_file%c_name)) 
    399          ELSE 
    400             td_file%t_dim( td_file%i_uldid )%l_uld=.TRUE. 
     405         !ELSE 
     406         !   td_file%t_dim( td_file%i_uldid )%l_uld=.TRUE. 
    401407         ENDIF 
    402408 
     
    468474   !> The variable structure inside file structure is then completed. 
    469475   !> @note variable value are not read ! 
    470    ! 
     476   !> 
    471477   !> @author J.Paul 
    472478   !> @date November, 2013 - Initial Version 
     
    475481   !> @date January, 2016 
    476482   !> - increment n3d for 4D variable 
    477    ! 
     483   !> @date October, 2016 
     484   !> - check variable to be used (variable's dimension allowed and variable 
     485   !> not "dummy") 
     486   !> 
    478487   !> @param[inout] td_file   file structure 
    479488   !------------------------------------------------------------------- 
     
    503512         il_nvar=td_file%i_nvar 
    504513         ALLOCATE(tl_var(il_nvar)) 
    505          ii=0 
    506514         DO ji = 1, il_nvar 
    507515           ! read variable information 
    508516           tl_var(ji)=iom_cdf__read_var_meta( td_file, ji)  
    509            IF( .NOT. var_is_dummy(tl_var(ji)) )THEN 
    510               ii=ii+1 
    511            ENDIF 
    512517         ENDDO 
    513518 
    514519         ! update number of variable used 
    515          td_file%i_nvar=ii 
     520         td_file%i_nvar=COUNT(tl_var(:)%l_use) 
    516521 
    517522         ALLOCATE(td_file%t_var(td_file%i_nvar)) 
     
    519524         ii=0 
    520525         DO ji = 1, il_nvar 
    521             IF( .NOT. var_is_dummy(tl_var(ji)) )THEN 
     526            IF( tl_var(ji)%l_use )THEN 
    522527               ii=ii+1 
    523528               td_file%t_var(ii)=var_copy(tl_var(ji)) 
     
    554559                     td_file%i_timeid=ji 
    555560                  ELSE 
     561                     IF( td_file%i_timeid /= ji )THEN 
     562                        CALL logger_warn("IOM CDF GET FILE VAR: find more "//& 
     563                        &                 "than one time variable in file "//& 
     564                        &                 TRIM(td_file%c_name)//". see "//& 
     565                        &                 "dummy.cfg configuration file to"//& 
     566                        &                 " not used dummy variables.") 
     567                     ENDIF 
    556568                     il_attid=0 
    557569                     IF( ASSOCIATED(td_file%t_var(ii)%t_att) )THEN 
     
    560572                     IF( il_attid /= 0 )THEN 
    561573                        td_file%i_timeid=ji 
    562                      !ELSE 
    563                      !   CALL logger_error("IOM CDF GET FILE VAR: find more "//& 
    564                      !   &                 "than one time variable in file "//& 
    565                      !   &                 TRIM(td_file%c_name) ) 
    566574                     ENDIF 
    567575                  ENDIF 
     
    654662         &  " IOM CDF READ DIM: no id associated to file "//TRIM(td_file%c_name)) 
    655663 
    656       ELSE       
     664      ELSE 
    657665 
    658666         CALL logger_trace( & 
     
    725733   !> @author J.Paul 
    726734   !> @date November, 2013 - Initial Version 
     735   !> @date November 2017 
     736   !> - check if cl_value is not bug  
    727737   ! 
    728738   !> @param[in] td_file   file structure 
     
    795805 
    796806            CASE(NF90_CHAR) 
     807               CALL logger_debug( " IOM CDF READ ATT: get NF90_CHAR ") 
    797808 
    798809               ! check string lengths 
     
    811822                  CALL iom_cdf__check(il_status,"IOM CDF READ ATT: ") 
    812823 
     824                  ! check cl_value 
     825                  IF( LLT(cl_value,'') ) cl_value = '' 
    813826                  iom_cdf__read_att_name=att_init(cl_name, cl_value) 
    814827 
     
    816829          
    817830            CASE(NF90_BYTE) 
     831               CALL logger_debug( " IOM CDF READ ATT: get NF90_BYTE ") 
    818832 
    819833               ALLOCATE( bl_value( il_len), & 
     
    839853 
    840854            CASE(NF90_SHORT) 
     855               CALL logger_debug( " IOM CDF READ ATT: get NF90_SHORT ") 
    841856 
    842857               ALLOCATE( sl_value( il_len), & 
     
    863878 
    864879            CASE(NF90_INT) 
     880               CALL logger_debug( " IOM CDF READ ATT: get NF90_INT ") 
    865881 
    866882               ALLOCATE( il_value( il_len), & 
     
    886902 
    887903            CASE(NF90_FLOAT) 
     904               CALL logger_debug( " IOM CDF READ ATT: get NF90_FLOAT ") 
    888905 
    889906               ALLOCATE( fl_value( il_len), & 
     
    910927 
    911928            CASE(NF90_DOUBLE) 
     929               CALL logger_debug( " IOM CDF READ ATT: get NF90_DOUBLE ") 
    912930 
    913931               ALLOCATE( dl_value( il_len), & 
     
    14151433         ENDDO 
    14161434 
     1435         !! check if variable is dummy 
     1436         IF( var_is_dummy(iom_cdf__read_var_meta) )THEN 
     1437            iom_cdf__read_var_meta%l_use=.FALSE. 
     1438         ENDIF 
     1439 
     1440         !! check if all dimensions are allowed 
     1441         DO ji=1,il_ndim 
     1442            IF( ALL(td_file%t_dim(:)%i_id /= il_dimid(ji)) )THEN 
     1443               iom_cdf__read_var_meta%l_use=.FALSE. 
     1444            ENDIF 
     1445         ENDDO 
     1446 
    14171447         ! clean 
    14181448         CALL dim_clean(tl_dim(:)) 
     
    14861516      ELSE IF( id_ndim > 0 )THEN 
    14871517 
    1488  
    14891518         ii=1 
    14901519         DO ji = 1, id_ndim 
    14911520 
    1492             !!! check no dummy dimension to be used 
     1521            ! check if dimension to be used, is allowed 
    14931522            IF( ANY(td_file%t_dim(:)%i_id == id_dimid(ji)) )THEN 
    14941523               IF( ii > ip_maxdim )THEN 
     
    15061535               tl_dim(ii) = dim_init( td_file%t_dim(il_xyzt2(ii))%c_name, & 
    15071536               &                      td_file%t_dim(il_xyzt2(ii))%i_len ) 
    1508              
     1537 
    15091538               ii=ii+1 
    15101539            ELSE 
     
    20822111                  & 'gcost','gcosu','gcosv','gcosf', & 
    20832112                  & 'gsint','gsinu','gsinv','gsinf', & 
    2084                   & 'mbathy','misf','isf_draft',     & 
     2113                  & 'mbathy','misf','isf_draft','isfdraft',     & 
    20852114                  & 'hbatt','hbatu','hbatv','hbatf', & 
    20862115                  & 'gsigt','gsigu','gsigv','gsigf', & 
     
    21912220         CALL iom_cdf__check(il_status,"IOM CDF WRITE VAR DEF: ") 
    21922221      ENDIF 
     2222      CALL logger_debug("IOM CDF WRITE VAR DEF: type = "//TRIM(fct_str(tl_var%i_type))) 
    21932223 
    21942224      ! remove unuseful attribute 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/iom_mpp.f90

    r6392 r8862  
    385385      CHARACTER(LEN=*),          INTENT(IN) :: cd_name 
    386386      INTEGER(i4), DIMENSION(:), INTENT(IN), OPTIONAL :: id_start 
    387       INTEGER(i4), DIMENSION(:), INTENT(IN), OPTIONAL :: id_count       
     387      INTEGER(i4), DIMENSION(:), INTENT(IN), OPTIONAL :: id_count   
    388388 
    389389      ! local variable 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90

    r6392 r8862  
    5151!>       - cn_varcfg : variable configuration file  
    5252!> (see ./SIREN/cfg/variable.cfg) 
     53!>       - cn_dimcfg : dimension configuration file. define dimensions allowed 
     54!> (see ./SIREN/cfg/dimension.cfg). 
    5355!>       - cn_dumcfg : useless (dummy) configuration file, for useless  
    5456!> dimension or variable (see ./SIREN/cfg/dummy.cfg). 
     
    115117!>       - cn_east  : east  boundary indices on fine grid<br/> 
    116118!>       - cn_west  : west  boundary indices on fine grid<br/> 
     119!>       - in_ncrs  : number of point(s) with coarse value save at boundaries<br/> 
    117120!>       - ln_oneseg: use only one segment for each boundary or not 
    118121!> 
     
    130133!> @date September, 2015 
    131134!> - manage useless (dummy) variable, attributes, and dimension 
     135!> @date October, 2016 
     136!> - allow to choose the number of boundary point with coarse grid value. 
     137!> - dimension to be used select from configuration file 
    132138!> 
    133139!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    208214 
    209215   ! namcfg 
    210    CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg'  
    211    CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg' 
     216   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg'  
     217   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg' 
     218   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg' 
    212219 
    213220   ! namcrs 
     
    231238   LOGICAL                                 :: ln_east  = .TRUE. 
    232239   LOGICAL                                 :: ln_west  = .TRUE. 
    233    LOGICAL                                 :: ln_oneseg= .TRUE. 
    234240   CHARACTER(LEN=lc)                       :: cn_north = '' 
    235241   CHARACTER(LEN=lc)                       :: cn_south = '' 
    236242   CHARACTER(LEN=lc)                       :: cn_east  = '' 
    237243   CHARACTER(LEN=lc)                       :: cn_west  = '' 
     244   INTEGER(i4)                             :: in_ncrs  = 2 
     245   LOGICAL                                 :: ln_oneseg= .TRUE. 
    238246 
    239247   ! namout 
     
    248256   NAMELIST /namcfg/ &  !< config namelist 
    249257   &  cn_varcfg, &       !< variable configuration file 
     258   &  cn_dimcfg, &       !< dimension configuration file 
    250259   &  cn_dumcfg          !< dummy configuration file 
    251260 
     
    276285   &  cn_east ,   &     !< east  boundary indices on fine grid 
    277286   &  cn_west ,   &     !< west  boundary indices on fine grid 
     287   &  in_ncrs,    &     !< number of point with coarse value save at boundaries  
    278288   &  ln_oneseg         !< use only one segment for each boundary or not 
    279289 
     
    319329      CALL var_def_extra(TRIM(cn_varcfg)) 
    320330 
     331      ! get dimension allowed 
     332      CALL dim_def_extra(TRIM(cn_dimcfg)) 
     333 
    321334      ! get dummy variable 
    322335      CALL var_get_dummy(TRIM(cn_dumcfg)) 
     
    435448   DO jk=1,ip_ncard 
    436449      CALL merge_bathy_get_boundary(tl_bathy0, tl_bathy1, tl_bdy(jk), & 
    437       &                             il_rho(:),                        & 
     450      &                             il_rho(:), in_ncrs,                      & 
    438451      &                             dl_refined(:,:,:,:), dl_weight(:,:,:,:), & 
    439452      &                             dl_fill) 
     
    621634   DEALLOCATE(dl_weight) 
    622635   CALL boundary_clean(tl_bdy(:)) 
     636   CALL var_clean_extra() 
    623637 
    624638   ! close log file 
     
    638652   !> @param[in] td_bdy          boundary structure 
    639653   !> @param[in] id_rho          array of refinement factor 
     654   !> @param[in] id_ncrs         number of point with coarse value save at boundaries 
    640655   !> @param[inout] dd_refined   array of refined bathymetry  
    641656   !> @param[inout] dd_weight    array of weight 
    642657   !> @param[in] dd_fill         fillValue 
    643658   !> 
    644    !> @todo improve boundary weight function 
    645659   !------------------------------------------------------------------- 
    646660   SUBROUTINE merge_bathy_get_boundary( td_bathy0, td_bathy1, td_bdy, & 
    647    &                                    id_rho,                       & 
     661   &                                    id_rho, id_ncrs,              & 
    648662   &                                    dd_refined, dd_weight, dd_fill ) 
    649663 
     
    655669      TYPE(TBDY)                     , INTENT(IN   ) :: td_bdy 
    656670      INTEGER(i4), DIMENSION(:)      , INTENT(IN   ) :: id_rho 
     671      INTEGER(i4)                    , INTENT(IN   ) :: id_ncrs 
    657672      REAL(dp)   , DIMENSION(:,:,:,:), INTENT(INOUT) :: dd_refined 
    658673      REAL(dp)   , DIMENSION(:,:,:,:), INTENT(INOUT) :: dd_weight 
     
    670685      INTEGER(i4) :: il_jmax0 
    671686 
     687      INTEGER(i4) :: il_width 
     688 
    672689      INTEGER(i4), DIMENSION(2,2)         :: il_offset 
    673690      INTEGER(i4), DIMENSION(2,2)         :: il_ind 
     
    838855            CASE('north') 
    839856 
    840 !               ! npoint coarse 
    841 !               il_width=td_bdy%t_seg(jl)%i_width-id_npoint 
    842 !               ! compute "distance" 
    843 !               dl_tmp1d(:)=(/(ji,ji=il_width-1,1,-1),(0,ji=1,id_npoint)/) 
    844 !               ! compute weight on segment 
    845 !               dl_tmp1d(:)= 0.5 + 0.5*COS( (dp_pi*dl_tmp1d(:)) / & 
    846 !               &                           (il_width) ) 
    847  
     857 
     858               ! save n coarse point 
     859               il_width=td_bdy%t_seg(jl)%i_width-id_ncrs 
    848860               ! compute "distance" 
    849                dl_tmp1d(:)=(/(ji-1,ji=td_bdy%t_seg(jl)%i_width-1,1,-1),0/) 
     861               dl_tmp1d(:)=(/(ji,ji=il_width,1,-1),(0,ji=1,id_ncrs)/) 
    850862 
    851863               ! compute weight on segment 
    852864               dl_tmp1d(:)= 0.5 + 0.5*COS( (dp_pi*dl_tmp1d(:)) / & 
    853                &                           (td_bdy%t_seg(jl)%i_width) ) 
     865               &                           (il_width) ) 
     866 
    854867 
    855868               ALLOCATE( dl_wseg(tl_dom1%t_dim(1)%i_len, & 
     
    862875            CASE('south') 
    863876 
     877               ! save n coarse point 
     878               il_width=td_bdy%t_seg(jl)%i_width-id_ncrs 
    864879               ! compute "distance" 
    865                dl_tmp1d(:)=(/0,(ji-1,ji=1,td_bdy%t_seg(jl)%i_width-1)/)                
     880               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width)/) 
    866881 
    867882               ! compute weight on segment 
    868883               dl_tmp1d(:)= 0.5 + 0.5*COS( (dp_pi*dl_tmp1d(:)) / & 
    869                &                           (td_bdy%t_seg(jl)%i_width) ) 
     884               &                           (il_width) ) 
     885 
    870886 
    871887               ALLOCATE( dl_wseg(tl_dom1%t_dim(1)%i_len, & 
     
    878894            CASE('east') 
    879895 
     896               ! save n coarse point 
     897               il_width=td_bdy%t_seg(jl)%i_width-id_ncrs 
    880898               ! compute "distance" 
    881                dl_tmp1d(:)=(/(ji-1,ji=td_bdy%t_seg(jl)%i_width-1,1,-1),0/) 
     899               dl_tmp1d(:)=(/(ji,ji=il_width,1,-1),(0,ji=1,id_ncrs)/) 
    882900 
    883901               ! compute weight on segment 
    884902               dl_tmp1d(:)= 0.5 + 0.5*COS( (dp_pi*dl_tmp1d(:)) / & 
    885                &                           (td_bdy%t_seg(jl)%i_width) ) 
     903               &                           (il_width) ) 
     904 
    886905 
    887906               ALLOCATE( dl_wseg(tl_dom1%t_dim(1)%i_len, & 
     
    894913            CASE('west') 
    895914 
     915               ! save n coarse point 
     916               il_width=td_bdy%t_seg(jl)%i_width-id_ncrs 
    896917               ! compute "distance" 
    897                dl_tmp1d(:)=(/0,(ji-1,ji=1,td_bdy%t_seg(jl)%i_width-1)/)                
     918               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width)/) 
    898919 
    899920               ! compute weight on segment 
    900921               dl_tmp1d(:)= 0.5 + 0.5*COS( (dp_pi*dl_tmp1d(:)) / & 
    901                &                           (td_bdy%t_seg(jl)%i_width) ) 
     922               &                           (il_width) ) 
     923 
    902924 
    903925               ALLOCATE( dl_wseg(tl_dom1%t_dim(1)%i_len, & 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/mpp.f90

    r6392 r8862  
    266266   PRIVATE :: mpp__copy_arr            ! copy array of mpp structure 
    267267   PRIVATE :: mpp__get_use_unit        ! get sub domains to be used (which cover "zoom domain") 
    268    PRIVATE :: mpp__init_mask           ! initialise mpp structure, given file name 
     268   PRIVATE :: mpp__init_mask           ! initialise mpp structure, given mask array 
    269269   PRIVATE :: mpp__init_var            ! initialise mpp structure, given variable strcuture 
    270270   PRIVATE :: mpp__init_file           ! initialise a mpp structure, given file structure  
     
    586586               WRITE(*,'(/a)') " Variable(s) used : " 
    587587               DO ji=1,td_mpp%t_proc(1)%i_nvar 
    588                   WRITE(*,'(3x,a)') TRIM(td_mpp%t_proc(1)%t_var(ji)%c_name)  
     588                  WRITE(*,'(3x,a)') TRIM(td_mpp%t_proc(1)%t_var(ji)%c_name) 
    589589               ENDDO 
    590590            ENDIF 
     
    25502550   !> and the number of processors following I and J. 
    25512551   !> Then the number of sea/land processors is compute with mask 
    2552    ! 
     2552   !> 
    25532553   !> @author J.Paul 
    25542554   !> @date October, 2015 - Initial version 
    2555    ! 
     2555   !> @date October, 2016 
     2556   !> - compare index to td_lay number of proc instead of td_mpp (bug fix) 
     2557   !> 
    25562558   !> @param[in] td_mpp mpp strcuture 
    25572559   !> @param[in] id_mask   sub domain mask (sea=1, land=0) 
     
    26702672 
    26712673            ! east boundary 
    2672             IF( ji == td_mpp%i_niproc )THEN 
     2674            IF( ji == td_lay%i_niproc )THEN 
    26732675               il_lei = td_lay%i_lci(ji,jj) 
    26742676            ELSE 
     
    26772679 
    26782680            ! north boundary 
    2679             IF( jj == td_mpp%i_njproc )THEN 
     2681            IF( jj == td_lay%i_njproc )THEN 
    26802682               il_lej = td_lay%i_lcj(ji,jj) 
    26812683            ELSE 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/phycst.f90

    r6392 r8862  
    3434   PUBLIC :: dp_siday   !< sideral day                        [s] 
    3535 
    36    REAL(wp), PUBLIC ::   rday = 24.*60.*60.     !: day                                [s] 
    37    REAL(wp), PUBLIC ::   rsiyea                 !: sideral year                       [s] 
    38    REAL(wp), PUBLIC ::   rsiday                 !: sideral day                        [s] 
     36   REAL(dp), PUBLIC ::   rday = 24.*60.*60.     !: day                                [s] 
     37   REAL(dp), PUBLIC ::   rsiyea                 !: sideral year                       [s] 
     38   REAL(dp), PUBLIC ::   rsiday                 !: sideral day                        [s] 
    3939 
    4040   REAL(dp), PARAMETER :: dp_pi = 3.14159274101257_dp 
    41    REAL(dp), PARAMETER :: dp_eps = EPSILON(1._dp) 
     41   REAL(dp), PARAMETER :: dp_eps = 0.5 * EPSILON(1._dp) 
    4242   REAL(dp), PARAMETER :: dp_rearth = 6371229._dp 
    4343   REAL(dp), PARAMETER :: dp_deg2rad = dp_pi/180.0 
     
    4545 
    4646   REAL(dp), PARAMETER :: dp_day = 24.*60.*60.      
    47    REAL(dp), PARAMETER :: dp_siyea = 365.25_wp * dp_day * & 
    48       &  2._wp * dp_pi / 6.283076_dp 
    49    REAL(dp), PARAMETER :: dp_siday = dp_day / ( 1._wp + dp_day / dp_siyea ) 
     47   REAL(dp), PARAMETER :: dp_siyea = 365.25_dp * dp_day * & 
     48      &  2._dp * dp_pi / 6.283076_dp 
     49   REAL(dp), PARAMETER :: dp_siday = dp_day / ( 1._dp + dp_day / dp_siyea ) 
    5050 
    51    REAL(dp), PARAMETER :: dp_delta=1.e-6 
     51   REAL(dp), PARAMETER :: dp_delta=1.e-5 
    5252   REAL(dp), PARAMETER :: dp_omega= 2._dp * dp_pi / dp_siday 
    5353END MODULE phycst 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/variable.f90

    r6392 r8862  
    3434!>    Note:<br/> 
    3535!>       - others optionals arguments could be added, see var_init. 
    36 !>       - to put variable 0D, use td_dim with all dimension unused 
     36!>       - to put scalar variable (OD), use td_dim with all dimension unused 
    3737!> (td_dim(:)%l_use=.FALSE.) 
    3838!>     
     
    267267!>    - cd_varinfo is variable information from namelist 
    268268!> 
     269!>    to clean global array of variable structure:<br/> 
     270!>@code 
     271!>    CALL var_clean_extra( ) 
     272!>@endcode 
     273!> 
    269274!>    to check variable dimension expected, as defined in file 'variable.cfg':<br/> 
    270275!>@code 
     
    287292!> @date Spetember, 2015 
    288293!> - manage useless (dummy) variable 
    289 ! 
     294!> @date October, 2016 
     295!> - add subroutine to clean global array of extra information. 
     296!> - define logical for variable to be used 
     297!> 
    290298!> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    291299!---------------------------------------------------------------------- 
     
    337345   PUBLIC :: var_def_extra     !< read variable configuration file, and save extra information. 
    338346   PUBLIC :: var_chg_extra     !< read variable namelist information, and modify extra information. 
     347   PUBLIC :: var_clean_extra   !< clean gloabl array of extra information. 
    339348   PUBLIC :: var_check_dim     !< check variable dimension expected 
    340349   PUBLIC :: var_get_dummy     !< fill dummy variable array 
     
    416425      TYPE(TDIM), DIMENSION(ip_maxdim)  :: t_dim           !< variable dimension 
    417426  
    418       LOGICAL           :: l_file = .FALSE.  !< variable read in a file 
     427      LOGICAL           :: l_file = .FALSE. !< variable read in a file 
     428      LOGICAL           :: l_use  = .TRUE.  !< variable to be used 
    419429 
    420430      ! highlight some attributes 
     
    451461                                                        !< fill when running var_def_extra()  
    452462 
    453    CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumvar !< dummy variable 
     463   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumvar !< dummy variable 
    454464 
    455465   INTERFACE var_init 
     
    593603         CALL att_clean(tl_att) 
    594604      ENDIF 
     605 
     606      var__copy_unit%l_file     = td_var%l_file 
     607      var__copy_unit%l_use      = td_var%l_use 
    595608 
    596609      ! copy highlight attribute 
     
    11261139   !> @date July, 2015 
    11271140   !> - add unit factor (to change unit) 
     1141   !> @date November, 2016 
     1142   !> - allow to add scalar value 
    11281143   !> 
    11291144   !> @param[in] cd_name         variable name 
     
    12791294         dl_value(1,1,1,:) = dd_value(:) 
    12801295      ELSE 
    1281          CALL logger_fatal("VAR INIT: can not add value from variable "//& 
    1282          &  TRIM(cd_name)//". invalid dimension to be used") 
     1296         IF( SIZE(dd_value(:)) > 1 )THEN 
     1297            CALL logger_fatal("VAR INIT: can not add value from variable "//& 
     1298            &  TRIM(cd_name)//". invalid dimension to be used") 
     1299         ELSE 
     1300            dl_value(1,1,1,1) = dd_value(1) 
     1301            CALL logger_warn("VAR INIT: add scalar value for variable "//& 
     1302            &  TRIM(cd_name)) 
     1303 
     1304         ENDIF 
    12831305      ENDIF 
    12841306 
     
    66696691      ! check if variable is in array of variable structure 
    66706692      DO ji=1,il_size 
     6693 
    66716694         ! look for variable name 
    66726695         IF( fct_lower(td_var(ji)%c_name) == fct_lower(cd_name) )THEN 
     
    66836706 
    66846707         ELSE IF( PRESENT(cd_stdname) )THEN  
     6708 
    66856709            IF( fct_lower(td_var(ji)%c_stdname) == fct_lower(cd_stdname) .AND.& 
    66866710            &    TRIM(fct_lower(td_var(ji)%c_stdname)) /= '' )THEN 
     
    66906714            ENDIF 
    66916715 
     6716         ENDIF 
     6717 
    66926718         ! look for variable longname 
    6693          ELSE IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.& 
    6694          &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
     6719         IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.& 
     6720         &   TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
    66956721             
    66966722            var_get_index=ji 
    66976723            EXIT 
     6724 
     6725         ELSE IF( PRESENT(cd_stdname) )THEN 
     6726 
     6727            IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_stdname) .AND.& 
     6728            &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
     6729             
     6730               var_get_index=ji 
     6731               EXIT 
     6732            ENDIF 
    66986733 
    66996734         ENDIF 
     
    67346769      ! check if variable is in array of variable structure 
    67356770      DO ji=1,il_size 
     6771       
    67366772         ! look for variable name 
    67376773         IF( fct_lower(td_var(ji)%c_name) == fct_lower(cd_name) )THEN 
     
    67476783            EXIT 
    67486784 
    6749          ! look for variable long name 
    6750          ELSE IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.& 
    6751          &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
    6752              
    6753             var_get_id=td_var(ji)%i_id 
    6754             EXIT 
    6755  
    6756          ELSE IF( PRESENT(cd_stdname) )THEN  
     6785         ELSE IF( PRESENT(cd_stdname) )THEN 
     6786 
    67576787            IF( fct_lower(td_var(ji)%c_stdname) == fct_lower(cd_stdname) .AND.& 
    67586788            &    TRIM(fct_lower(td_var(ji)%c_stdname)) /= '' )THEN 
     
    67616791               EXIT 
    67626792            ENDIF 
     6793 
     6794         ENDIF 
     6795 
     6796         ! look for variable long name 
     6797         IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.& 
     6798         &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
     6799             
     6800            var_get_id=td_var(ji)%i_id 
     6801            EXIT 
     6802 
     6803         ELSE IF( PRESENT(cd_stdname) )THEN  
     6804 
     6805            IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_stdname) .AND.& 
     6806            &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN 
     6807             
     6808               var_get_id=td_var(ji)%i_id 
     6809               EXIT 
     6810            ENDIF 
     6811 
    67636812         ENDIF 
    67646813 
     
    71767225   !------------------------------------------------------------------- 
    71777226   !> @brief 
     7227   !> This subroutine clean global array of variable structure  
     7228   !> with extra information: tg_varextra. 
     7229   !>  
     7230   !> @author J.Paul 
     7231   !> @date October, 2016 - Initial Version 
     7232   !------------------------------------------------------------------- 
     7233   SUBROUTINE var_clean_extra( ) 
     7234      IMPLICIT NONE 
     7235      ! Argument 
     7236      !---------------------------------------------------------------- 
     7237 
     7238      CALL var_clean(tg_varextra(:)) 
     7239      DEALLOCATE(tg_varextra) 
     7240 
     7241   END SUBROUTINE var_clean_extra 
     7242   !------------------------------------------------------------------- 
     7243   !> @brief 
    71787244   !> This subroutine read matrix value from character string in namelist 
    7179    !> and fill variable strucutre value. 
     7245   !> and fill variable structure value. 
    71807246   !> 
    71817247   !> @details 
     
    84638529      ! loop indices 
    84648530      ! namelist 
    8465       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar 
    8466       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim 
    8467       CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt 
     8531      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar 
     8532      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim 
     8533      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt 
    84688534 
    84698535      !---------------------------------------------------------------- 
     
    85268592 
    85278593      var_is_dummy=.FALSE. 
    8528       DO ji=1,ip_maxdum 
     8594      DO ji=1,ip_maxdumcfg 
    85298595         IF( fct_lower(td_var%c_name) == fct_lower(cm_dumvar(ji)) )THEN 
    85308596            var_is_dummy=.TRUE. 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/src/vgrid.f90

    r6392 r8862  
    751751      ENDIF 
    752752 
    753       ! get ghoste cell 
     753      ! get ghost cell 
    754754      il_xghost(:,:)=grid_get_ghost(tl_bathy) 
    755755 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/SIREN/templates/merge_bathy.nam

    r6392 r8862  
    3434   cn_east= 
    3535   cn_west= 
     36   in_ncrs= 
    3637   ln_oneseg= 
    3738/ 
Note: See TracChangeset for help on using the changeset viewer.