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 13806 for NEMO – NEMO

Changeset 13806 for NEMO


Ignore:
Timestamp:
2020-11-17T16:58:38+01:00 (3 years ago)
Author:
laurent
Message:

Various improvements and cleaning + keep up with "r13801" of the trunk.

Location:
NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice
Files:
1 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/cfgs/SHARED/namelist_ref

    r13733 r13806  
    280280   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    281281   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    282    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     282   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    283283   !!    
    284284   ! Sea-ice specific: (IF: nn_ice >=1 ) 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/IOM/iom.F90

    r13781 r13806  
    77   !!            2.0  ! 2006-02  (S. Masson) Adaptation to NEMO 
    88   !!            3.0  ! 2007-07  (D. Storkey) Changes to iom_gettime 
    9    !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case   
     9   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case 
    1010   !!            3.6  ! 2014-15  DIMG format removed 
    1111   !!            3.6  ! 2015-15  (J. Harle) Added procedure to read REAL attributes 
     
    2121   !!---------------------------------------------------------------------- 
    2222   USE dom_oce         ! ocean space and time domain 
    23    USE domutl          !  
     23   USE domutl          ! 
    2424   USE c1d             ! 1D vertical configuration 
    2525   USE flo_oce         ! floats module declarations 
     
    4444   USE trc, ONLY    :  profsed 
    4545#endif 
    46    USE lib_fortran  
     46   USE lib_fortran 
    4747   USE diu_bulk, ONLY : ln_diurnal_only, ln_diurnal 
    4848 
    4949   IMPLICIT NONE 
    5050   PUBLIC   !   must be public to be able to access iom_def through iom 
    51     
     51 
    5252#if defined key_iomput 
    5353   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .TRUE.        !: iom_put flag 
     
    9191      MODULE PROCEDURE iom_p0d_dp, iom_p1d_dp, iom_p2d_dp, iom_p3d_dp, iom_p4d_dp 
    9292   END INTERFACE iom_put 
    93    
     93 
    9494   !! * Substitutions 
    9595#  include "do_loop_substitute.h90" 
     
    101101CONTAINS 
    102102 
    103    SUBROUTINE iom_init( cdname, fname, ld_closedef )  
     103   SUBROUTINE iom_init( cdname, fname, ld_closedef ) 
    104104      !!---------------------------------------------------------------------- 
    105105      !!                     ***  ROUTINE   *** 
    106106      !! 
    107       !! ** Purpose :    
     107      !! ** Purpose : 
    108108      !! 
    109109      !!---------------------------------------------------------------------- 
     
    136136      llrst_context =  (TRIM(cdname) == TRIM(crxios_context) .OR. TRIM(cdname) == TRIM(cwxios_context)) 
    137137 
    138       ! Calendar type is now defined in xml file  
     138      ! Calendar type is now defined in xml file 
    139139      IF (.NOT.(xios_getvar('ref_year' ,irefyear ))) irefyear  = 1900 
    140140      IF (.NOT.(xios_getvar('ref_month',irefmonth))) irefmonth = 01 
     
    153153      IF(.NOT.llrst_context) CALL set_scalar 
    154154      ! 
    155       IF( TRIM(cdname) == TRIM(cxios_context) ) THEN   
    156          CALL set_grid( "T", glamt, gphit, .FALSE., .FALSE. )  
     155      IF( TRIM(cdname) == TRIM(cxios_context) ) THEN 
     156         CALL set_grid( "T", glamt, gphit, .FALSE., .FALSE. ) 
    157157         CALL set_grid( "U", glamu, gphiu, .FALSE., .FALSE. ) 
    158158         CALL set_grid( "V", glamv, gphiv, .FALSE., .FALSE. ) 
     
    172172      ENDIF 
    173173      ! 
    174       IF( TRIM(cdname) == TRIM(cxios_context)//"_crs" ) THEN   
     174      IF( TRIM(cdname) == TRIM(cxios_context)//"_crs" ) THEN 
    175175         CALL dom_grid_crs   ! Save the parent grid information  & Switch to coarse grid domain 
    176176         ! 
    177          CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE., .FALSE. )  
    178          CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. )  
    179          CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. )  
    180          CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. )  
     177         CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 
     178         CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. ) 
     179         CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. ) 
     180         CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 
    181181         CALL set_grid_znl( gphit_crs ) 
    182182          ! 
     
    203203 
    204204          ! ABL 
    205           IF( .NOT. ALLOCATED(ght_abl) ) THEN   ! force definition for xml files (xios)  
     205          IF( .NOT. ALLOCATED(ght_abl) ) THEN   ! force definition for xml files (xios) 
    206206             ALLOCATE( ght_abl(jpka), ghw_abl(jpka), e3t_abl(jpka), e3w_abl(jpka) )   ! default allocation needed by iom 
    207207             ght_abl(:) = -1._wp   ;   ghw_abl(:) = -1._wp 
     
    210210          CALL iom_set_axis_attr( "ght_abl", ght_abl(2:jpka) ) 
    211211          CALL iom_set_axis_attr( "ghw_abl", ghw_abl(2:jpka) ) 
    212            
     212 
    213213          ! Add vertical grid bounds 
    214214          zt_bnds(2,:      ) = gdept_1d(:) 
     
    302302      !!                   ***  SUBROUTINE  iom_set_rstw_var_active  *** 
    303303      !! 
    304       !! ** Purpose :  enable variable in restart file when writing with XIOS  
     304      !! ** Purpose :  enable variable in restart file when writing with XIOS 
    305305      !!--------------------------------------------------------------------- 
    306306   CHARACTER(len = *), INTENT(IN) :: field 
     
    313313 
    314314   DO i = 1, max_rst_fields 
    315        IF(TRIM(rst_wfields(i)%vname) == field) THEN  
     315       IF(TRIM(rst_wfields(i)%vname) == field) THEN 
    316316          rst_wfields(i)%active = .TRUE. 
    317317          llis_set = .TRUE. 
     
    321321!Warn if variable is not in defined in rst_wfields 
    322322   IF(.NOT.llis_set) THEN 
    323       WRITE(ctmp1,*) 'iom_set_rstw_var_active: variable ', field ,' is available for writing but not defined'  
     323      WRITE(ctmp1,*) 'iom_set_rstw_var_active: variable ', field ,' is available for writing but not defined' 
    324324      CALL ctl_stop( 'iom_set_rstw_var_active:', ctmp1 ) 
    325325   ENDIF 
     
    336336      !! 
    337337      !! ** Purpose :  define file name in XIOS context for reading restart file, 
    338       !!               enable variables present in restart file for reading with XIOS  
     338      !!               enable variables present in restart file for reading with XIOS 
    339339      !!--------------------------------------------------------------------- 
    340340 
     
    374374                 CASE ("grid_N") 
    375375                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    376                         domain_ref="grid_N", operation = "instant")  
     376                        domain_ref="grid_N", operation = "instant") 
    377377                CASE ("grid_vector") 
    378378                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
     
    393393      !!                   ***  SUBROUTINE  iom_set_rstw_core  *** 
    394394      !! 
    395       !! ** Purpose :  set variables which are always in restart file  
     395      !! ** Purpose :  set variables which are always in restart file 
    396396      !!--------------------------------------------------------------------- 
    397397   CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 
     
    430430      !!                   ***  SUBROUTINE iom_set_rst_vars   *** 
    431431      !! 
    432       !! ** Purpose :  Fill array fields with the information about all  
    433       !!               possible variables and corresponding grids definition  
     432      !! ** Purpose :  Fill array fields with the information about all 
     433      !!               possible variables and corresponding grids definition 
    434434      !!               for reading/writing restart with XIOS 
    435435      !!--------------------------------------------------------------------- 
     
    442442        i = i + 1; fields(i)%vname="ub";             fields(i)%grid="grid_N_3D" 
    443443        i = i + 1; fields(i)%vname="vn";             fields(i)%grid="grid_N_3D" 
    444         i = i + 1; fields(i)%vname="vb";             fields(i)%grid="grid_N_3D"   
     444        i = i + 1; fields(i)%vname="vb";             fields(i)%grid="grid_N_3D" 
    445445        i = i + 1; fields(i)%vname="tn";             fields(i)%grid="grid_N_3D" 
    446446        i = i + 1; fields(i)%vname="tb";             fields(i)%grid="grid_N_3D" 
     
    458458        i = i + 1; fields(i)%vname="emp_b";          fields(i)%grid="grid_N" 
    459459        i = i + 1; fields(i)%vname="sfx_b";          fields(i)%grid="grid_N" 
    460         i = i + 1; fields(i)%vname="en" ;            fields(i)%grid="grid_N_3D"  
     460        i = i + 1; fields(i)%vname="en" ;            fields(i)%grid="grid_N_3D" 
    461461        i = i + 1; fields(i)%vname="avt_k";            fields(i)%grid="grid_N_3D" 
    462462        i = i + 1; fields(i)%vname="avm_k";            fields(i)%grid="grid_N_3D" 
     
    565565        CALL xios_get_handle("file_definition", filegroup_hdl ) 
    566566        CALL xios_add_child(filegroup_hdl, file_hdl, 'wrestart') 
    567         IF(nxioso.eq.1) THEN  
    568            CALL xios_set_file_attr( "wrestart", type="one_file", enabled=.TRUE.,&  
    569                                     mode="write", output_freq=xios_timestep)  
    570            if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in one_file mode'  
    571         ELSE   
    572            CALL xios_set_file_attr( "wrestart", type="multiple_file", enabled=.TRUE.,&  
    573                                     mode="write", output_freq=xios_timestep)  
    574            if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in multiple_file mode'  
    575         ENDIF  
     567        IF(nxioso.eq.1) THEN 
     568           CALL xios_set_file_attr( "wrestart", type="one_file", enabled=.TRUE.,& 
     569                                    mode="write", output_freq=xios_timestep) 
     570           if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in one_file mode' 
     571        ELSE 
     572           CALL xios_set_file_attr( "wrestart", type="multiple_file", enabled=.TRUE.,& 
     573                                    mode="write", output_freq=xios_timestep) 
     574           if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in multiple_file mode' 
     575        ENDIF 
    576576        CALL xios_set_file_attr( "wrestart", name=trim(cdrst_file)) 
    577577!define fields for restart context 
     
    585585                 CASE ("grid_N") 
    586586                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 
    587                         domain_ref="grid_N", prec = 8, operation = "instant")  
     587                        domain_ref="grid_N", prec = 8, operation = "instant") 
    588588                 CASE ("grid_vector") 
    589589                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_wfields(i)%vname), & 
     
    598598   END SUBROUTINE iom_set_rstw_active 
    599599 
    600    SUBROUTINE iom_set_rst_context(ld_rstr)  
     600   SUBROUTINE iom_set_rst_context(ld_rstr) 
    601601     !!--------------------------------------------------------------------- 
    602602      !!                   ***  SUBROUTINE  iom_set_rst_context  *** 
    603603      !! 
    604       !! ** Purpose : Define domain, axis and grid for restart (read/write)  
    605       !!              context  
    606       !!                
     604      !! ** Purpose : Define domain, axis and grid for restart (read/write) 
     605      !!              context 
     606      !! 
    607607      !!--------------------------------------------------------------------- 
    608608   LOGICAL, INTENT(IN)               :: ld_rstr 
    609 !ld_rstr is true for restart context. There is no need to define grid for  
     609!ld_rstr is true for restart context. There is no need to define grid for 
    610610!restart read, because it's read from file 
    611611#if defined key_iomput 
    612    TYPE(xios_domaingroup)            :: domaingroup_hdl  
    613    TYPE(xios_domain)                 :: domain_hdl  
    614    TYPE(xios_axisgroup)              :: axisgroup_hdl  
    615    TYPE(xios_axis)                   :: axis_hdl  
    616    TYPE(xios_scalar)                 :: scalar_hdl  
    617    TYPE(xios_scalargroup)            :: scalargroup_hdl  
    618  
    619      CALL xios_get_handle("domain_definition",domaingroup_hdl)  
    620      CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N")  
    621      CALL set_grid("N", glamt, gphit, .TRUE., ld_rstr)  
    622   
    623      CALL xios_get_handle("axis_definition",axisgroup_hdl)  
    624      CALL xios_add_child(axisgroup_hdl, axis_hdl, "nav_lev")  
     612   TYPE(xios_domaingroup)            :: domaingroup_hdl 
     613   TYPE(xios_domain)                 :: domain_hdl 
     614   TYPE(xios_axisgroup)              :: axisgroup_hdl 
     615   TYPE(xios_axis)                   :: axis_hdl 
     616   TYPE(xios_scalar)                 :: scalar_hdl 
     617   TYPE(xios_scalargroup)            :: scalargroup_hdl 
     618 
     619     CALL xios_get_handle("domain_definition",domaingroup_hdl) 
     620     CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 
     621     CALL set_grid("N", glamt, gphit, .TRUE., ld_rstr) 
     622 
     623     CALL xios_get_handle("axis_definition",axisgroup_hdl) 
     624     CALL xios_add_child(axisgroup_hdl, axis_hdl, "nav_lev") 
    625625!AGRIF fails to compile when unit= is in call to xios_set_axis_attr 
    626 !    CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels",  unit="m", positive="down")  
     626!    CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels",  unit="m", positive="down") 
    627627     CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels in meters", positive="down") 
    628      CALL iom_set_axis_attr( "nav_lev", paxis = gdept_1d )  
    629  
    630      CALL xios_get_handle("scalar_definition", scalargroup_hdl)  
    631      CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar")  
     628     CALL iom_set_axis_attr( "nav_lev", paxis = gdept_1d ) 
     629 
     630     CALL xios_get_handle("scalar_definition", scalargroup_hdl) 
     631     CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 
    632632#endif 
    633633   END SUBROUTINE iom_set_rst_context 
     
    671671      CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu] 
    672672      CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode) 
    673       CHARACTER(LEN=10)     ::   clsuffix  ! ".nc"  
     673      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" 
    674674      CHARACTER(LEN=15)     ::   clcpu     ! the cpu number (max jpmax_digits digits) 
    675675      CHARACTER(LEN=256)    ::   clinfo    ! info character 
    676       LOGICAL               ::   llok      ! check the existence  
     676      LOGICAL               ::   llok      ! check the existence 
    677677      LOGICAL               ::   llwrt     ! local definition of ldwrt 
    678678      LOGICAL               ::   llstop    ! local definition of ldstop 
     
    680680      INTEGER               ::   icnt      ! counter for digits in clcpu (max = jpmax_digits) 
    681681      INTEGER               ::   iln, ils  ! lengths of character 
    682       INTEGER               ::   istop     !  
     682      INTEGER               ::   istop     ! 
    683683      ! local number of points for x,y dimensions 
    684684      ! position of first local point for x,y dimensions 
     
    716716      clname   = trim(cdname) 
    717717      IF ( .NOT. Agrif_Root() .AND. .NOT. lliof ) THEN 
    718          iln    = INDEX(clname,'/')  
     718         iln    = INDEX(clname,'/') 
    719719         cltmpn = clname(1:iln) 
    720720         clname = clname(iln+1:LEN_TRIM(clname)) 
     
    740740         clname = clname(1:iln-1)//'_'//TRIM(clcpu)//TRIM(clsuffix) 
    741741         icnt = 0 
    742          INQUIRE( FILE = clname, EXIST = llok )  
     742         INQUIRE( FILE = clname, EXIST = llok ) 
    743743         ! we try different formats for the cpu number by adding 0 
    744744         DO WHILE( .NOT.llok .AND. icnt < jpmax_digits ) 
     
    758758      ! if no file was found... 
    759759      IF( .NOT. llok ) THEN 
    760          IF( .NOT. llwrt ) THEN   ! we are in read mode  
     760         IF( .NOT. llwrt ) THEN   ! we are in read mode 
    761761            IF( llstop ) THEN   ;   CALL ctl_stop( TRIM(clinfo), 'File '//TRIM(cltmpn)//'* not found' ) 
    762762            ELSE                ;   istop = nstop + 1   ! make sure that istop /= nstop so we don't open the file 
    763763            ENDIF 
    764          ELSE                     ! we are in write mode so we  
     764         ELSE                     ! we are in write mode so we 
    765765            clname = cltmpn       ! get back the file name without the cpu number 
    766766         ENDIF 
    767767      ELSE 
    768          IF( llwrt .AND. .NOT. ln_clobber ) THEN   ! we stop as we want to write in a new file  
     768         IF( llwrt .AND. .NOT. ln_clobber ) THEN   ! we stop as we want to write in a new file 
    769769            CALL ctl_stop( TRIM(clinfo), 'We want to write in a new file but '//TRIM(clname)//' already exists...' ) 
    770770            istop = nstop + 1                      ! make sure that istop /= nstop so we don't open the file 
    771          ELSEIF( llwrt ) THEN     ! the file exists and we are in write mode with permission to  
     771         ELSEIF( llwrt ) THEN     ! the file exists and we are in write mode with permission to 
    772772            clname = cltmpn       ! overwrite so get back the file name without the cpu number 
    773773         ENDIF 
     
    810810            IF( iom_file(jf)%nfid > 0 ) THEN 
    811811               CALL iom_nf90_close( jf ) 
    812                iom_file(jf)%nfid       = 0          ! free the id  
     812               iom_file(jf)%nfid       = 0          ! free the id 
    813813               IF( PRESENT(kiomid) )   kiomid = 0   ! return 0 as id to specify that the file was closed 
    814814               IF(lwp) WRITE(numout,*) TRIM(clinfo)//' close file: '//TRIM(iom_file(jf)%name)//' ok' 
     
    819819         END DO 
    820820      ENDIF 
    821       !     
     821      ! 
    822822   END SUBROUTINE iom_close 
    823823 
    824824 
    825    FUNCTION iom_varid ( kiomid, cdvar, kdimsz, kndims, lduld, ldstop )   
     825   FUNCTION iom_varid ( kiomid, cdvar, kdimsz, kndims, lduld, ldstop ) 
    826826      !!----------------------------------------------------------------------- 
    827827      !!                  ***  FUNCTION  iom_varid  *** 
     
    849849      IF( kiomid > 0 ) THEN 
    850850         clinfo = 'iom_varid, file: '//trim(iom_file(kiomid)%name)//', var: '//trim(cdvar) 
    851          IF( iom_file(kiomid)%nfid == 0 ) THEN  
     851         IF( iom_file(kiomid)%nfid == 0 ) THEN 
    852852            CALL ctl_stop( trim(clinfo), 'the file is not open' ) 
    853853         ELSE 
     
    868868                        &                      'increase the parameter jpmax_vars') 
    869869               ENDIF 
    870                IF( llstop .AND. iom_varid == -1 )   CALL ctl_stop( TRIM(clinfo)//' not found' )  
     870               IF( llstop .AND. iom_varid == -1 )   CALL ctl_stop( TRIM(clinfo)//' not found' ) 
    871871            ELSE 
    872872               iom_varid = iiv 
    873                IF( PRESENT(kdimsz) ) THEN  
     873               IF( PRESENT(kdimsz) ) THEN 
    874874                  i_nvd = iom_file(kiomid)%ndims(iiv) 
    875875                  IF( i_nvd <= size(kdimsz) ) THEN 
     
    10011001      REAL(dp)        , ALLOCATABLE  , DIMENSION(:)           ::   ztmp_pvar ! tmp var to read field 
    10021002      INTEGER         , INTENT(in   )              , OPTIONAL ::   ktime     ! record number 
    1003       INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading  
     1003      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading 
    10041004      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kcount    ! number of points in each axis 
    10051005      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    10241024      REAL(dp)        , INTENT(  out), DIMENSION(:)           ::   pvar      ! read field 
    10251025      INTEGER         , INTENT(in   )              , OPTIONAL ::   ktime     ! record number 
    1026       INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading  
     1026      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading 
    10271027      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kcount    ! number of points in each axis 
    10281028      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    10451045      REAL(dp)        , INTENT(in   )              , OPTIONAL ::   psgn      ! -1.(1.): (not) change sign across the north fold 
    10461046      INTEGER         , INTENT(in   )              , OPTIONAL ::   kfill     ! value of kfillmode in lbc_lbk 
    1047       INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kstart    ! start axis position of the reading  
     1047      INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kstart    ! start axis position of the reading 
    10481048      INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kcount    ! number of points in each axis 
    10491049      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    10701070      REAL(dp)        , INTENT(in   )              , OPTIONAL ::   psgn      ! -1.(1.): (not) change sign across the north fold 
    10711071      INTEGER         , INTENT(in   )              , OPTIONAL ::   kfill     ! value of kfillmode in lbc_lbk 
    1072       INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kstart    ! start axis position of the reading  
     1072      INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kstart    ! start axis position of the reading 
    10731073      INTEGER         , INTENT(in   ), DIMENSION(2), OPTIONAL ::   kcount    ! number of points in each axis 
    10741074      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    10911091      REAL(dp)        , INTENT(in   )              , OPTIONAL ::   psgn      ! -1.(1.) : (not) change sign across the north fold 
    10921092      INTEGER         , INTENT(in   )              , OPTIONAL ::   kfill     ! value of kfillmode in lbc_lbk 
    1093       INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kstart    ! start axis position of the reading  
     1093      INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kstart    ! start axis position of the reading 
    10941094      INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kcount    ! number of points in each axis 
    10951095      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    11161116      REAL(dp)        , INTENT(in   )              , OPTIONAL ::   psgn      ! -1.(1.) : (not) change sign across the north fold 
    11171117      INTEGER         , INTENT(in   )              , OPTIONAL ::   kfill     ! value of kfillmode in lbc_lbk 
    1118       INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kstart    ! start axis position of the reading  
     1118      INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kstart    ! start axis position of the reading 
    11191119      INTEGER         , INTENT(in   ), DIMENSION(3), OPTIONAL ::   kcount    ! number of points in each axis 
    11201120      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS 
     
    11501150      REAL(dp)                   , INTENT(in   ), OPTIONAL ::   psgn      ! -1.(1.) : (not) change sign across the north fold 
    11511151      INTEGER                    , INTENT(in   ), OPTIONAL ::   kfill     ! value of kfillmode in lbc_lbk 
    1152       INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kstart    ! start position of the reading in each axis  
     1152      INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kstart    ! start position of the reading in each axis 
    11531153      INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kcount    ! number of points to be read in each axis 
    11541154      LOGICAL                    , INTENT(in   ), OPTIONAL ::   ldxios    ! use XIOS to read restart 
     
    11561156      LOGICAL                        ::   llok        ! true if ok! 
    11571157      LOGICAL                        ::   llxios      ! local definition for XIOS read 
    1158       INTEGER                        ::   jl          ! loop on number of dimension  
     1158      INTEGER                        ::   jl          ! loop on number of dimension 
    11591159      INTEGER                        ::   idom        ! type of domain 
    11601160      INTEGER                        ::   idvar       ! id of the variable 
    11611161      INTEGER                        ::   inbdim      ! number of dimensions of the variable 
    1162       INTEGER                        ::   idmspc      ! number of spatial dimensions  
     1162      INTEGER                        ::   idmspc      ! number of spatial dimensions 
    11631163      INTEGER                        ::   itime       ! record number 
    11641164      INTEGER                        ::   istop       ! temporary value of nstop 
    11651165      INTEGER                        ::   ix1, ix2, iy1, iy2   ! subdomain indexes 
    11661166      INTEGER                        ::   ji, jj      ! loop counters 
    1167       INTEGER                        ::   irankpv     !  
     1167      INTEGER                        ::   irankpv     ! 
    11681168      INTEGER                        ::   ind1, ind2  ! substring index 
    11691169      INTEGER, DIMENSION(jpmax_dims) ::   istart      ! starting point to read for each axis 
    1170       INTEGER, DIMENSION(jpmax_dims) ::   icnt        ! number of value to read along each axis  
     1170      INTEGER, DIMENSION(jpmax_dims) ::   icnt        ! number of value to read along each axis 
    11711171      INTEGER, DIMENSION(jpmax_dims) ::   idimsz      ! size of the dimensions of the variable 
    11721172      INTEGER, DIMENSION(jpmax_dims) ::   ishape      ! size of the dimensions of the variable 
     
    11761176      CHARACTER(LEN=256)             ::   clinfo      ! info character 
    11771177      CHARACTER(LEN=256)             ::   clname      ! file name 
    1178       CHARACTER(LEN=1)               ::   clrankpv, cldmspc      !  
     1178      CHARACTER(LEN=1)               ::   clrankpv, cldmspc      ! 
    11791179      CHARACTER(LEN=1)               ::   cl_type     ! local value of cd_type 
    11801180      LOGICAL                        ::   ll_only3rd  ! T => if kstart, kcount present then *only* use values for 3rd spatial dimension. 
     
    12051205         ! Search for the variable in the data base (eventually actualize data) 
    12061206         ! 
    1207          idvar = iom_varid( kiomid, cdvar )  
     1207         idvar = iom_varid( kiomid, cdvar ) 
    12081208         IF( idvar > 0 ) THEN 
    12091209            ! 
     
    12121212            idmspc = inbdim                                   ! number of spatial dimensions in the file 
    12131213            IF( iom_file(kiomid)%luld(idvar) )   idmspc = inbdim - 1 
    1214             IF( idmspc > 3 )   CALL ctl_stop(trim(clinfo), 'the file has more than 3 spatial dimensions this case is not coded...')  
     1214            IF( idmspc > 3 )   CALL ctl_stop(trim(clinfo), 'the file has more than 3 spatial dimensions this case is not coded...') 
    12151215            ! 
    12161216            ! Identify the domain in case of jpdom_auto definition 
    1217             IF( idom == jpdom_auto .OR. idom == jpdom_auto_xy ) THEN             
     1217            IF( idom == jpdom_auto .OR. idom == jpdom_auto_xy ) THEN 
    12181218               idom = jpdom_global   ! default 
    12191219               ! else: if the file name finishes with _xxxx.nc with xxxx any number 
     
    12521252                     CALL ctl_warn( trim(clinfo), '2D array input but 3 spatial dimensions in the file...'              ,   & 
    12531253                           &         'As the size of the z dimension is 1 and as we try to read the first record, ',   & 
    1254                            &         'we accept this case, even if there is a possible mix-up between z and time dimension' )    
     1254                           &         'we accept this case, even if there is a possible mix-up between z and time dimension' ) 
    12551255                     idmspc = idmspc - 1 
    12561256                  !!GS: possibility to read 3D ABL atmopsheric forcing and use 1st level to force BULK simulation 
     
    12641264            ! definition of istart and icnt 
    12651265            ! 
    1266             icnt  (:) = 1              ! default definition (simple way to deal with special cases listed above)  
    1267             istart(:) = 1              ! default definition (simple way to deal with special cases listed above)  
     1266            icnt  (:) = 1              ! default definition (simple way to deal with special cases listed above) 
     1267            istart(:) = 1              ! default definition (simple way to deal with special cases listed above) 
    12681268            istart(idmspc+1) = itime   ! temporal dimenstion 
    12691269            ! 
    12701270            IF( idom == jpdom_unknown ) THEN 
    1271                IF( PRESENT(kstart) .AND. idom /= jpdom_auto_xy ) THEN  
    1272                   istart(1:idmspc) = kstart(1:idmspc)  
     1271               IF( PRESENT(kstart) .AND. idom /= jpdom_auto_xy ) THEN 
     1272                  istart(1:idmspc) = kstart(1:idmspc) 
    12731273                  icnt  (1:idmspc) = kcount(1:idmspc) 
    12741274               ELSE 
     
    12761276               ENDIF 
    12771277            ELSE   !   not a 1D array as pv_r1d requires jpdom_unknown 
    1278                ! we do not read the overlap and the extra-halos -> from Nis0 to Nie0 and from Njs0 to Nje0  
     1278               ! we do not read the overlap and the extra-halos -> from Nis0 to Nie0 and from Njs0 to Nje0 
    12791279               IF( idom == jpdom_global )   istart(1:2) = (/ mig0(Nis0), mjg0(Njs0) /) 
    12801280               icnt(1:2) = (/ Ni_0, Nj_0 /) 
     
    12961296                  WRITE( ctmp1, FMT="('(istart(', i1, ') + icnt(', i1, ') - 1) = ', i5)" ) jl, jl, itmp 
    12971297                  WRITE( ctmp2, FMT="(' is larger than idimsz(', i1,') = ', i5)"         ) jl, idimsz(jl) 
    1298                   CALL ctl_stop( trim(clinfo), 'start and count too big regarding to the size of the data, ', ctmp1, ctmp2 )      
     1298                  CALL ctl_stop( trim(clinfo), 'start and count too big regarding to the size of the data, ', ctmp1, ctmp2 ) 
    12991299               ENDIF 
    13001300            END DO 
    13011301            ! 
    13021302            ! check that icnt matches the input array 
    1303             !-      
     1303            !- 
    13041304            IF( idom == jpdom_unknown ) THEN 
    13051305               IF( irankpv == 1 )        ishape(1:1) = SHAPE(pv_r1d) 
     
    13111311                  ishape(1:2) = SHAPE(pv_r2d(Nis0:Nie0,Njs0:Nje0  ))   ;   ctmp1 = 'd(Nis0:Nie0,Njs0:Nje0)' 
    13121312               ENDIF 
    1313                IF( irankpv == 3 ) THEN  
     1313               IF( irankpv == 3 ) THEN 
    13141314                  ishape(1:3) = SHAPE(pv_r3d(Nis0:Nie0,Njs0:Nje0,:))   ;   ctmp1 = 'd(Nis0:Nie0,Njs0:Nje0,:)' 
    13151315               ENDIF 
    1316             ENDIF          
     1316            ENDIF 
    13171317            DO jl = 1, irankpv 
    13181318               WRITE( ctmp2, FMT="(', ', i1,'): ', i5,' /= icnt(', i1,'):', i5)" ) jl, ishape(jl), jl, icnt(jl) 
     
    13231323 
    13241324         ! read the data 
    1325          !-      
     1325         !- 
    13261326         IF( idvar > 0 .AND. istop == nstop ) THEN   ! no additional errors until this point... 
    13271327            ! 
     
    13301330            ELSE                               ;   ix1 = 1      ;   ix2 = icnt(1)   ;   iy1 = 1      ;   iy2 = icnt(2) 
    13311331            ENDIF 
    1332        
     1332 
    13331333            CALL iom_nf90_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, pv_r1d, pv_r2d, pv_r3d ) 
    13341334 
     
    13591359#if defined key_iomput 
    13601360!would be good to be able to check which context is active and swap only if current is not restart 
    1361          CALL iom_swap( TRIM(crxios_context) )  
     1361         CALL iom_swap( TRIM(crxios_context) ) 
    13621362         IF( PRESENT(pv_r3d) ) THEN 
    13631363            IF(lwp) WRITE(numout,*) 'XIOS RST READ (3D): ',TRIM(cdvar) 
     
    13741374         CALL iom_swap( TRIM(cxios_context) ) 
    13751375#else 
    1376          istop = istop + 1  
     1376         istop = istop + 1 
    13771377         clinfo = 'Can not use XIOS in iom_get_123d, file: '//trim(clname)//', var:'//trim(cdvar) 
    13781378#endif 
     
    13871387      zofs = iom_file(kiomid)%ofs(idvar)      ! offset 
    13881388      IF(     PRESENT(pv_r1d) ) THEN 
    1389          IF( zscf /= 1. )   pv_r1d(:) = pv_r1d(:) * zscf  
     1389         IF( zscf /= 1. )   pv_r1d(:) = pv_r1d(:) * zscf 
    13901390         IF( zofs /= 0. )   pv_r1d(:) = pv_r1d(:) + zofs 
    13911391      ELSEIF( PRESENT(pv_r2d) ) THEN 
     
    14011401   SUBROUTINE iom_get_var( cdname, z2d) 
    14021402      CHARACTER(LEN=*), INTENT(in ) ::   cdname 
    1403       REAL(wp), DIMENSION(jpi,jpj) ::   z2d  
     1403      REAL(wp), DIMENSION(jpi,jpj) ::   z2d 
    14041404#if defined key_iomput 
    14051405      IF( xios_field_is_active( cdname, at_current_timestep_arg = .TRUE. ) ) THEN 
     
    14131413 
    14141414 
    1415    FUNCTION iom_getszuld ( kiomid )   
     1415   FUNCTION iom_getszuld ( kiomid ) 
    14161416      !!----------------------------------------------------------------------- 
    14171417      !!                  ***  FUNCTION  iom_getszuld  *** 
     
    14291429      ENDIF 
    14301430   END FUNCTION iom_getszuld 
    1431     
     1431 
    14321432 
    14331433   !!---------------------------------------------------------------------- 
     
    14931493      ENDIF 
    14941494   END SUBROUTINE iom_g1d_ratt 
    1495     
     1495 
    14961496   SUBROUTINE iom_g0d_catt( kiomid, cdatt, cdatt0d, cdvar ) 
    14971497      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file 
     
    15521552      ENDIF 
    15531553   END SUBROUTINE iom_p1d_ratt 
    1554     
     1554 
    15551555   SUBROUTINE iom_p0d_catt( kiomid, cdatt, cdatt0d, cdvar ) 
    15561556      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file 
     
    15711571      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    15721572      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1573       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1573      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    15741574      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    15751575      REAL(sp)        , INTENT(in)                         ::   pvar     ! written field 
     
    16011601      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    16021602      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1603       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1603      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    16041604      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    16051605      REAL(dp)        , INTENT(in)                         ::   pvar     ! written field 
     
    16321632      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    16331633      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1634       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1634      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    16351635      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    16361636      REAL(sp)        , INTENT(in), DIMENSION(          :) ::   pvar     ! written field 
     
    16621662      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    16631663      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1664       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1664      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    16651665      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    16661666      REAL(dp)        , INTENT(in), DIMENSION(          :) ::   pvar     ! written field 
     
    16931693      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    16941694      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1695       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1695      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    16961696      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    16971697      REAL(sp)        , INTENT(in), DIMENSION(:,    :    ) ::   pvar     ! written field 
     
    17231723      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    17241724      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1725       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1725      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    17261726      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    17271727      REAL(dp)        , INTENT(in), DIMENSION(:,    :    ) ::   pvar     ! written field 
     
    17541754      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    17551755      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1756       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1756      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    17571757      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    17581758      REAL(sp)        , INTENT(in),       DIMENSION(:,:,:) ::   pvar     ! written field 
     
    17841784      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
    17851785      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
    1786       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1786      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
    17871787      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
    17881788      REAL(dp)        , INTENT(in),       DIMENSION(:,:,:) ::   pvar     ! written field 
     
    18541854         ! 
    18551855      ENDIF 
    1856        
     1856 
    18571857   END SUBROUTINE iom_delay_rst 
    1858    
    1859     
     1858 
     1859 
    18601860 
    18611861   !!---------------------------------------------------------------------- 
     
    18691869!!clem      zz(:,:)=pfield0d 
    18701870!!clem      CALL xios_send_field(cdname, zz) 
    1871       CALL xios_send_field(cdname, (/pfield0d/))  
     1871      CALL xios_send_field(cdname, (/pfield0d/)) 
    18721872#else 
    18731873      IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings 
     
    18821882!!clem      zz(:,:)=pfield0d 
    18831883!!clem      CALL xios_send_field(cdname, zz) 
    1884       CALL xios_send_field(cdname, (/pfield0d/))  
     1884      CALL xios_send_field(cdname, (/pfield0d/)) 
    18851885#else 
    18861886      IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings 
     
    20262026      TYPE(xios_gridgroup) :: gridgroup_hdl 
    20272027      TYPE(xios_grid)      :: grid_hdl 
    2028       TYPE(xios_domain)    :: domain_hdl  
    2029       TYPE(xios_axis)      :: axis_hdl  
     2028      TYPE(xios_domain)    :: domain_hdl 
     2029      TYPE(xios_axis)      :: axis_hdl 
    20302030      CHARACTER(LEN=64)    :: cldomrefid   ! domain_ref name 
    20312031      CHARACTER(len=1)     :: cl1          ! last character of this name 
     
    20472047         CALL xios_add_child(grid_hdl, axis_hdl, 'depth'//cl1)              ! add its axis 
    20482048      ENDIF 
    2049       !       
     2049      ! 
    20502050   END SUBROUTINE iom_set_zoom_domain_attr 
    20512051 
     
    21402140      !!---------------------------------------------------------------------- 
    21412141      !!---------------------------------------------------------------------- 
    2142       INTEGER         , INTENT(in) ::   kt  
     2142      INTEGER         , INTENT(in) ::   kt 
    21432143      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    21442144      !!---------------------------------------------------------------------- 
     
    21552155      !!---------------------------------------------------------------------- 
    21562156      clname = cdname 
    2157       IF( TRIM(Agrif_CFixed()) .NE. '0' ) clname = TRIM(Agrif_CFixed())//"_"//clname  
     2157      IF( TRIM(Agrif_CFixed()) .NE. '0' ) clname = TRIM(Agrif_CFixed())//"_"//clname 
    21582158      IF( xios_is_valid_context(clname) ) THEN 
    21592159         CALL iom_swap( cdname )   ! swap to cdname context 
     
    21812181      CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=Ni0glo,nj_glo=Nj0glo,ibegin=mig0(Nis0)-1,jbegin=mjg0(Njs0)-1,ni=Ni_0,nj=Nj_0) 
    21822182      CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = -nn_hls, data_ni = jpi, data_jbegin = -nn_hls, data_nj = jpj) 
    2183 !don't define lon and lat for restart reading context.  
     2183!don't define lon and lat for restart reading context. 
    21842184      IF ( .NOT.ldrxios ) & 
    21852185         CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = real(RESHAPE(plon(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp),   & 
    2186          &                                        latvalue = real(RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp ))   
     2186         &                                        latvalue = real(RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp )) 
    21872187      ! 
    21882188      IF ( ln_mskland .AND. (.NOT.ldxios) ) THEN 
     
    22812281      CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = -nn_hls, data_ni = jpi, data_jbegin = -nn_hls, data_nj = jpj) 
    22822282      CALL iom_set_domain_attr("gznl", lonvalue = real(zlon, dp),   & 
    2283          &                             latvalue = real(RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp))   
     2283         &                             latvalue = real(RESHAPE(plat(Nis0:Nie0, Njs0:Nje0),(/ Ni_0*Nj_0 /)),dp)) 
    22842284      CALL iom_set_zoom_domain_attr("ptr", ibegin=ix-1, jbegin=0, ni=1, nj=Nj0glo) 
    22852285      ! 
     
    23302330      TYPE(xios_duration)            ::   f_op, f_of 
    23312331      !!---------------------------------------------------------------------- 
    2332       !  
     2332      ! 
    23332333      ! frequency of the call of iom_put (attribut: freq_op) 
    23342334      f_op%timestep = 1        ;  f_of%timestep =  0  ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 
     
    23412341      ! output file names (attribut: name) 
    23422342      DO ji = 1, 9 
    2343          WRITE(cl1,'(i1)') ji  
     2343         WRITE(cl1,'(i1)') ji 
    23442344         CALL iom_update_file_name('file'//cl1) 
    23452345      END DO 
    23462346      DO ji = 1, 99 
    2347          WRITE(cl2,'(i2.2)') ji  
     2347         WRITE(cl2,'(i2.2)') ji 
    23482348         CALL iom_update_file_name('file'//cl2) 
    23492349      END DO 
    23502350      DO ji = 1, 999 
    2351          WRITE(cl3,'(i3.3)') ji  
     2351         WRITE(cl3,'(i3.3)') ji 
    23522352         CALL iom_update_file_name('file'//cl3) 
    23532353      END DO 
    23542354 
    23552355      ! Zooms... 
    2356       clgrd = (/ 'T', 'U', 'W' /)  
     2356      clgrd = (/ 'T', 'U', 'W' /) 
    23572357      DO jg = 1, SIZE(clgrd)                                                                   ! grid type 
    23582358         cl1 = clgrd(jg) 
     
    24192419               IF( zlon == -10. .AND. zlat ==   4. ) THEN   ;   zlon = 0.   ;   zlat = 0.   ;   ENDIF 
    24202420               CALL dom_ngb( zlon, zlat, ix, iy, cl1 ) 
    2421                IF( zlon >= 0. ) THEN   
     2421               IF( zlon >= 0. ) THEN 
    24222422                  IF( zlon == REAL(NINT(zlon), wp) ) THEN   ;   WRITE(clon, '(i3,  a)') NINT( zlon), 'e' 
    24232423                  ELSE                                      ;   WRITE(clon, '(f5.1,a)')       zlon , 'e' 
    24242424                  ENDIF 
    2425                ELSE              
     2425               ELSE 
    24262426                  IF( zlon == REAL(NINT(zlon), wp) ) THEN   ;   WRITE(clon, '(i3,  a)') NINT(-zlon), 'w' 
    24272427                  ELSE                                      ;   WRITE(clon, '(f5.1,a)')      -zlon , 'w' 
    24282428                  ENDIF 
    24292429               ENDIF 
    2430                IF( zlat >= 0. ) THEN   
     2430               IF( zlat >= 0. ) THEN 
    24312431                  IF( zlat == REAL(NINT(zlat), wp) ) THEN   ;   WRITE(clat, '(i2,  a)') NINT( zlat), 'n' 
    24322432                  ELSE                                      ;   WRITE(clat, '(f4.1,a)')       zlat , 'n' 
    24332433                  ENDIF 
    2434                ELSE              
     2434               ELSE 
    24352435                  IF( zlat == REAL(NINT(zlat), wp) ) THEN   ;   WRITE(clat, '(i2,  a)') NINT(-zlat), 's' 
    24362436                  ELSE                                      ;   WRITE(clat, '(f4.1,a)')      -zlat , 's' 
     
    24462446         END DO 
    24472447      END DO 
    2448        
     2448 
    24492449   END SUBROUTINE set_mooring 
    24502450 
    2451     
     2451 
    24522452   SUBROUTINE iom_update_file_name( cdid ) 
    24532453      !!---------------------------------------------------------------------- 
    24542454      !!                     ***  ROUTINE iom_update_file_name  *** 
    24552455      !! 
    2456       !! ** Purpose :    
     2456      !! ** Purpose : 
    24572457      !! 
    24582458      !!---------------------------------------------------------------------- 
     
    24682468      REAL(wp)           ::   zsec 
    24692469      LOGICAL            ::   llexist 
    2470       TYPE(xios_duration)   ::   output_freq  
     2470      TYPE(xios_duration)   ::   output_freq 
    24712471      !!---------------------------------------------------------------------- 
    24722472      ! 
     
    24772477         IF( jn == 2 )   CALL iom_get_file_attr( cdid, name_suffix = clname ) 
    24782478         ! 
    2479          IF ( TRIM(clname) /= '' ) THEN  
     2479         IF ( TRIM(clname) /= '' ) THEN 
    24802480            ! 
    24812481            idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
    2482             DO WHILE ( idx /= 0 )  
     2482            DO WHILE ( idx /= 0 ) 
    24832483               clname = clname(1:idx-1)//TRIM(cexper)//clname(idx+9:LEN_TRIM(clname)) 
    24842484               idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
     
    24862486            ! 
    24872487            idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 
    2488             DO WHILE ( idx /= 0 )  
     2488            DO WHILE ( idx /= 0 ) 
    24892489              IF ( output_freq%timestep /= 0) THEN 
    2490                   WRITE(clfreq,'(I18,A2)')INT(output_freq%timestep),'ts'  
     2490                  WRITE(clfreq,'(I18,A2)')INT(output_freq%timestep),'ts' 
    24912491                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    24922492              ELSE IF ( output_freq%second /= 0 ) THEN 
    2493                   WRITE(clfreq,'(I19,A1)')INT(output_freq%second),'s'  
     2493                  WRITE(clfreq,'(I19,A1)')INT(output_freq%second),'s' 
    24942494                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    24952495              ELSE IF ( output_freq%minute /= 0 ) THEN 
    2496                   WRITE(clfreq,'(I18,A2)')INT(output_freq%minute),'mi'  
     2496                  WRITE(clfreq,'(I18,A2)')INT(output_freq%minute),'mi' 
    24972497                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    24982498              ELSE IF ( output_freq%hour /= 0 ) THEN 
    2499                   WRITE(clfreq,'(I19,A1)')INT(output_freq%hour),'h'  
     2499                  WRITE(clfreq,'(I19,A1)')INT(output_freq%hour),'h' 
    25002500                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    25012501              ELSE IF ( output_freq%day /= 0 ) THEN 
    2502                   WRITE(clfreq,'(I19,A1)')INT(output_freq%day),'d'  
     2502                  WRITE(clfreq,'(I19,A1)')INT(output_freq%day),'d' 
    25032503                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    2504               ELSE IF ( output_freq%month /= 0 ) THEN    
    2505                   WRITE(clfreq,'(I19,A1)')INT(output_freq%month),'m'  
     2504              ELSE IF ( output_freq%month /= 0 ) THEN 
     2505                  WRITE(clfreq,'(I19,A1)')INT(output_freq%month),'m' 
    25062506                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    2507               ELSE IF ( output_freq%year /= 0 ) THEN    
    2508                   WRITE(clfreq,'(I19,A1)')INT(output_freq%year),'y'  
     2507              ELSE IF ( output_freq%year /= 0 ) THEN 
     2508                  WRITE(clfreq,'(I19,A1)')INT(output_freq%year),'y' 
    25092509                  itrlen = LEN_TRIM(ADJUSTL(clfreq)) 
    25102510              ELSE 
     
    25172517            ! 
    25182518            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
    2519             DO WHILE ( idx /= 0 )  
     2519            DO WHILE ( idx /= 0 ) 
    25202520               cldate = iom_sdate( fjulday - rn_Dt / rday ) 
    25212521               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 
     
    25242524            ! 
    25252525            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
    2526             DO WHILE ( idx /= 0 )  
     2526            DO WHILE ( idx /= 0 ) 
    25272527               cldate = iom_sdate( fjulday - rn_Dt / rday, ldfull = .TRUE. ) 
    25282528               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 
     
    25312531            ! 
    25322532            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
    2533             DO WHILE ( idx /= 0 )  
     2533            DO WHILE ( idx /= 0 ) 
    25342534               cldate = iom_sdate( fjulday + rn_Dt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
    25352535               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 
     
    25382538            ! 
    25392539            idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
    2540             DO WHILE ( idx /= 0 )  
     2540            DO WHILE ( idx /= 0 ) 
    25412541               cldate = iom_sdate( fjulday + rn_Dt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
    25422542               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 
     
    25662566      ! 
    25672567      CHARACTER(LEN=20) ::   iom_sdate 
    2568       CHARACTER(LEN=50) ::   clfmt                         !  format used to write the date  
     2568      CHARACTER(LEN=50) ::   clfmt                         !  format used to write the date 
    25692569      INTEGER           ::   iyear, imonth, iday, ihour, iminute, isec 
    25702570      REAL(wp)          ::   zsec 
     
    25882588      ENDIF 
    25892589      ! 
    2590       IF( iyear < 10000 ) THEN   ;   clfmt = "i4.4,2i2.2"                ! format used to write the date  
     2590      IF( iyear < 10000 ) THEN   ;   clfmt = "i4.4,2i2.2"                ! format used to write the date 
    25912591      ELSE                       ;   WRITE(clfmt, "('i',i1,',2i2.2')") INT(LOG10(REAL(iyear,wp))) + 1 
    25922592      ENDIF 
    25932593      ! 
    2594 !$AGRIF_DO_NOT_TREAT       
     2594!$AGRIF_DO_NOT_TREAT 
    25952595      ! needed in the conv 
    2596       IF( llfull ) THEN  
     2596      IF( llfull ) THEN 
    25972597         clfmt = TRIM(clfmt)//",'_',i2.2,':',i2.2,':',i2.2" 
    25982598         ihour   = isec / 3600 
     
    26042604         WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday                          ! date of the end of run 
    26052605      ENDIF 
    2606 !$AGRIF_END_DO_NOT_TREAT       
     2606!$AGRIF_END_DO_NOT_TREAT 
    26072607      ! 
    26082608   END FUNCTION iom_sdate 
     
    26132613   !!---------------------------------------------------------------------- 
    26142614   SUBROUTINE iom_setkt( kt, cdname ) 
    2615       INTEGER         , INTENT(in)::   kt  
     2615      INTEGER         , INTENT(in)::   kt 
    26162616      CHARACTER(LEN=*), INTENT(in) ::   cdname 
    26172617      IF( .FALSE. )   WRITE(numout,*) kt, cdname   ! useless test to avoid compilation warnings 
     
    26412641   SUBROUTINE iom_miss_val( cdname, pmiss_val ) 
    26422642      CHARACTER(LEN=*), INTENT(in ) ::   cdname 
    2643       REAL(wp)        , INTENT(out) ::   pmiss_val    
    2644       REAL(dp)                      ::   ztmp_pmiss_val    
     2643      REAL(wp)        , INTENT(out) ::   pmiss_val 
     2644      REAL(dp)                      ::   ztmp_pmiss_val 
    26452645#if defined key_iomput 
    26462646      ! get missing value 
     
    26522652#endif 
    26532653   END SUBROUTINE iom_miss_val 
    2654    
     2654 
    26552655   !!====================================================================== 
    26562656END MODULE iom 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbc_ice.F90

    r13655 r13806  
    2020# endif 
    2121# if defined key_cice 
    22    USE ice_domain_size, only: ncat  
     22   USE ice_domain_size, only: ncat 
    2323#endif 
    2424   USE lib_mpp          ! MPP library 
     
    3232# if defined  key_si3 
    3333   LOGICAL         , PUBLIC, PARAMETER ::   lk_si3     = .TRUE.   !: SI3 ice model 
    34    LOGICAL         , PUBLIC, PARAMETER ::   lk_cice    = .FALSE.  !: no CICE  
     34   LOGICAL         , PUBLIC, PARAMETER ::   lk_cice    = .FALSE.  !: no CICE 
    3535# endif 
    3636# if defined  key_cice 
     
    4747   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   alb_ice        !: ice albedo                                       [-] 
    4848 
    49    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qml_ice        !: heat available for snow / ice surface melting     [W/m2]  
    50    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qcn_ice        !: heat conduction flux in the layer below surface   [W/m2]  
     49   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qml_ice        !: heat available for snow / ice surface melting     [W/m2] 
     50   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qcn_ice        !: heat conduction flux in the layer below surface   [W/m2] 
    5151   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qtr_ice_top    !: solar flux transmitted below the ice surface      [W/m2] 
    5252 
     
    8787   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iu              !: ice fraction at NEMO U point 
    8888   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iv              !: ice fraction at NEMO V point 
    89     
     89 
    9090   ! variables used in the coupled interface 
    9191   INTEGER , PUBLIC, PARAMETER ::   jpl = ncat 
    92    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   u_ice, v_ice  
    93     
     92   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   u_ice, v_ice 
     93 
    9494   ! already defined in ice.F90 for SI3 
    9595   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i 
     
    9898   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   tatm_ice       !: air temperature [K] 
    9999#endif 
    100  
    101    !#LB: REAL(wp), PUBLIC, SAVE ::   pp_cldf = 0.81    !: cloud fraction over sea ice, summer CLIO value   [-] !#LB => moved to sbc_phy.F90 !!! 
    102100 
    103101   !! arrays relating to embedding ice in the ocean 
     
    145143         &                     v_ice(jpi,jpj)        , alb_ice(jpi,jpj,1)    , & 
    146144         &                     emp_ice(jpi,jpj)      , qns_ice(jpi,jpj,1)    , dqns_ice(jpi,jpj,1)   , & 
    147          &                     STAT= ierr(3) )       
     145         &                     STAT= ierr(3) ) 
    148146      IF( ln_cpl )   ALLOCATE( h_i(jpi,jpj,jpl) , h_s(jpi,jpj,jpl) , STAT=ierr(4) ) 
    149147#endif 
     
    168166   LOGICAL         , PUBLIC, PARAMETER ::   lk_si3     = .FALSE.  !: no SI3 ice model 
    169167   LOGICAL         , PUBLIC, PARAMETER ::   lk_cice    = .FALSE.  !: no CICE ice model 
    170    !#LB: REAL(wp)        , PUBLIC, PARAMETER ::   pp_cldf    = 0.81     !: cloud fraction over sea ice, summer CLIO value   [-] !#LB => moved to sbc_phy.F90 !!!   
    171    INTEGER         , PUBLIC, PARAMETER ::   jpl = 1  
     168 
     169   INTEGER         , PUBLIC, PARAMETER ::   jpl = 1 
    172170   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   u_ice, v_ice                        ! jpi, jpj 
    173171   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tn_ice, alb_ice, qns_ice, dqns_ice  ! (jpi,jpj,jpl) 
     
    178176   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   topmelt, botmelt 
    179177   ! 
    180    !! arrays related to embedding ice in the ocean.  
    181    !! These arrays need to be declared even if no ice model is required.  
     178   !! arrays related to embedding ice in the ocean. 
     179   !! These arrays need to be declared even if no ice model is required. 
    182180   !! In the no ice model or traditional levitating ice cases they contain only zeros 
    183181   !! --------------------- 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbc_oce.F90

    r13655 r13806  
    159159   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   frq_m     !: mean (nn_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level [-] 
    160160 
    161    !#LB: 
    162161   !!---------------------------------------------------------------------- 
    163162   !!                     Surface atmospheric fields 
     
    165164   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_air_zt       !: specific humidity of air at z=zt [kg/kg]ww 
    166165   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: theta_air_zt   !: potential temperature of air at z=zt [K] 
    167    !#LB. 
    168166 
    169167    
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbcblk.F90

    r13719 r13806  
    107107   ! 
    108108   !#LB: 
    109    LOGICAL  ::   ln_Cx_ice_cst      ! use constant ice-air bulk transfer coefficients (value given in namelist's rn_Cd_i, rn_Ce_i & rn_Ch_i) 
    110    REAL(wp) ::   rn_Cd_i, rn_Ce_i, rn_Ch_i 
    111    LOGICAL  ::   ln_Cx_ice_LU12      ! ice-atm drag = F( ice concentration )                        (Lupkes et al. JGR2012) 
    112    LOGICAL  ::   ln_Cx_ice_LG15      ! ice-atm drag = F( ice concentration, atmospheric stability ) (Lupkes et al. JGR2015) 
     109   LOGICAL  ::   ln_Cx_ice_cst             ! use constant air-ice bulk transfer coefficients (value given in namelist's rn_Cd_i, rn_Ce_i & rn_Ch_i) 
     110   REAL(wp) ::   rn_Cd_i, rn_Ce_i, rn_Ch_i ! values for  "    " 
     111   LOGICAL  ::   ln_Cx_ice_LU12            ! air-ice bulk transfer coefficients based on Lupkes et al., 2012) 
     112   LOGICAL  ::   ln_Cx_ice_LG15            ! air-ice bulk transfer coefficients based on Lupkes & Gryanik, 2015) 
    113113   !#LB. 
    114114   ! 
     
    137137   LOGICAL  ::   ln_humi_dpt    ! humidity read in files ("sn_humi") is dew-point temperature [K] if .true. !LB 
    138138   LOGICAL  ::   ln_humi_rlh    ! humidity read in files ("sn_humi") is relative humidity     [%] if .true. !LB 
    139    LOGICAL  ::   ln_tpot        !!GS: flag to compute or not potential temperature 
     139   LOGICAL  ::   ln_tair_pot    ! temperature read in files ("sn_tair") is already potential temperature (not absolute) 
    140140   ! 
    141141   INTEGER  ::   nhumi          ! choice of the bulk algorithm 
     
    218218      NAMELIST/namsbc_blk/ ln_NCAR, ln_COARE_3p0, ln_COARE_3p6, ln_ECMWF, ln_ANDREAS, &   ! bulk algorithm 
    219219         &                 rn_zqt, rn_zu, nn_iter_algo, ln_skin_cs, ln_skin_wl,       & 
    220          &                 rn_pfac, rn_efac,                                & 
    221          &                 ln_crt_fbk, rn_stau_a, rn_stau_b,                &   ! current feedback 
    222          &                 ln_humi_sph, ln_humi_dpt, ln_humi_rlh, ln_tpot,  & 
    223          &                 ln_Cx_ice_cst, rn_Cd_i, rn_Ce_i, rn_Ch_i,        & 
    224          &                 ln_Cx_ice_LU12, ln_Cx_ice_LG15,                  & 
    225          &                 cn_dir,                                          & 
    226          &                 sn_wndi, sn_wndj, sn_qsr, sn_qlw ,               &   ! input fields 
    227          &                 sn_tair, sn_humi, sn_prec, sn_snow, sn_slp,      & 
     220         &                 rn_pfac, rn_efac,                                          & 
     221         &                 ln_crt_fbk, rn_stau_a, rn_stau_b,                          &   ! current feedback 
     222         &                 ln_humi_sph, ln_humi_dpt, ln_humi_rlh, ln_tair_pot,        & 
     223         &                 ln_Cx_ice_cst, rn_Cd_i, rn_Ce_i, rn_Ch_i,                  & 
     224         &                 ln_Cx_ice_LU12, ln_Cx_ice_LG15,                            & 
     225         &                 cn_dir,                                                    & 
     226         &                 sn_wndi, sn_wndj, sn_qsr, sn_qlw ,                         &   ! input fields 
     227         &                 sn_tair, sn_humi, sn_prec, sn_snow, sn_slp,                & 
    228228         &                 sn_uoatm, sn_voatm, sn_cc, sn_hpgi, sn_hpgj 
    229229 
     
    567567         !      based on adiabatic lapse-rate (see Josey, Gulev & Yu, 2013) / doi=10.1016/B978-0-12-391851-2.00005-2 
    568568         !      (most reanalysis products provide absolute temp., not potential temp.) 
    569          IF( ln_tpot ) THEN 
     569         IF( ln_tair_pot ) THEN 
     570            ! temperature read into file is already potential temperature, do nothing... 
     571            theta_air_zt(:,:) = sf(jp_tair )%fnow(:,:,1)             
     572         ELSE 
    570573            ! temperature read into file is ABSOLUTE temperature (that's the case for ECMWF products for example...) 
    571             IF((kt==nit000).AND.lwp) WRITE(numout,*) ' *** sbc_blk() => computing air POTENTIAL temperature out of ABSOLUTE temperature!' 
     574            IF((kt==nit000).AND.lwp) WRITE(numout,*) ' *** sbc_blk() => air temperature converted from ABSOLUTE to POTENTIAL!' 
    572575            theta_air_zt(:,:) = sf(jp_tair )%fnow(:,:,1) + gamma_moist( sf(jp_tair )%fnow(:,:,1), q_air_zt(:,:) ) * rn_zqt 
    573          ELSE 
    574             ! temperature read into file is already potential temperature 
    575             theta_air_zt(:,:) = sf(jp_tair )%fnow(:,:,1) 
    576576         ENDIF 
    577577         ! 
     
    683683      CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add analytical tropical cyclone (Vincent et al. JGR 2012) 
    684684      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    685       zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
    686       zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
    687       ! ... scalar wind at T-point (not masked) 
    688       wndm(ji,jj) = SQRT( zwnd_i(ji,jj) * zwnd_i(ji,jj) + zwnd_j(ji,jj) * zwnd_j(ji,jj) ) 
     685         zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
     686         zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     687         ! ... scalar wind at T-point (not masked) 
     688         wndm(ji,jj) = SQRT( zwnd_i(ji,jj) * zwnd_i(ji,jj) + zwnd_j(ji,jj) * zwnd_j(ji,jj) ) 
    689689      END_2D 
    690690#else 
    691691      ! ... scalar wind module at T-point (not masked) 
    692692      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    693       wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  ) 
     693         wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  ) 
    694694      END_2D 
    695695#endif 
     
    787787      IF( ln_abl ) THEN         !==  ABL formulation  ==!   multiplication by rho_air and turbulent fluxes computation done in ablstp 
    788788         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    789          zztmp = zU_zu(ji,jj) 
    790          wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod 
    791          pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 
    792          psen(ji,jj)   = zztmp * zch_oce(ji,jj) 
    793          pevp(ji,jj)   = zztmp * zce_oce(ji,jj) 
    794          rhoa(ji,jj)   = rho_air( ptair(ji,jj), pqair(ji,jj), pslp(ji,jj) ) 
     789            zztmp = zU_zu(ji,jj) 
     790            wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod 
     791            pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 
     792            psen(ji,jj)   = zztmp * zch_oce(ji,jj) 
     793            pevp(ji,jj)   = zztmp * zce_oce(ji,jj) 
     794            rhoa(ji,jj)   = rho_air( ptair(ji,jj), pqair(ji,jj), pslp(ji,jj) ) 
    795795         END_2D 
    796796      ELSE                      !==  BLK formulation  ==!   turbulent fluxes computation 
     
    825825            zstmax = MIN( rn_stau_a * 3._wp + rn_stau_b, 0._wp )   ! set the max value of Stau corresponding to a wind of 3 m/s (<0) 
    826826            DO_2D( 0, 1, 0, 1 )   ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop 
    827             zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax )   ! stau (<0) must be smaller than zstmax 
    828             ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj  ) + pu(ji,jj) ) - puatm(ji,jj) ) 
    829             ztau_j(ji,jj) = ztau_j(ji,jj) + zstau * ( 0.5_wp * ( pv(ji  ,jj-1) + pv(ji,jj) ) - pvatm(ji,jj) ) 
    830             taum(ji,jj) = SQRT( ztau_i(ji,jj) * ztau_i(ji,jj) + ztau_j(ji,jj) * ztau_j(ji,jj) ) 
     827               zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax )   ! stau (<0) must be smaller than zstmax 
     828               ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj  ) + pu(ji,jj) ) - puatm(ji,jj) ) 
     829               ztau_j(ji,jj) = ztau_j(ji,jj) + zstau * ( 0.5_wp * ( pv(ji  ,jj-1) + pv(ji,jj) ) - pvatm(ji,jj) ) 
     830               taum(ji,jj) = SQRT( ztau_i(ji,jj) * ztau_i(ji,jj) + ztau_j(ji,jj) * ztau_j(ji,jj) ) 
    831831            END_2D 
    832832         ENDIF 
     
    836836         !     Note that coastal wind stress is not used in the code... so this extra care has no effect 
    837837         DO_2D( 0, 0, 0, 0 )              ! start loop at 2, in case ln_crt_fbk = T 
    838          utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj  ) ) & 
    839             &              * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
    840          vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( ztau_j(ji,jj) + ztau_j(ji  ,jj+1) ) & 
    841             &              * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
     838            utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj  ) ) & 
     839               &              * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 
     840            vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( ztau_j(ji,jj) + ztau_j(ji  ,jj+1) ) & 
     841               &              * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 
    842842         END_2D 
    843  
    844843 
    845844         IF( ln_crt_fbk ) THEN 
     
    870869   END SUBROUTINE blk_oce_1 
    871870 
    872     
     871 
    873872   SUBROUTINE blk_oce_2( ptair, pdqlw, pprec, psnow, &   ! <<= in 
    874873      &                   ptsk, psen, plat, pevp     )   ! <<= in 
     
    13391338         DO jl = 1, jpl 
    13401339            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    1341             zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac                            ! Effective thickness 
    1342             IF( zhe >=  zfac2 )   zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor 
     1340               zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac                            ! Effective thickness 
     1341               IF( zhe >=  zfac2 )   zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor 
    13431342            END_2D 
    13441343         END DO 
     
    13541353      DO jl = 1, jpl 
    13551354         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    1356          ! 
    1357          zkeff_h = zfac * zgfac(ji,jj,jl) / &                                    ! Effective conductivity of the snow-ice system divided by thickness 
    1358             &      ( rcnd_i * phs(ji,jj,jl) + rn_cnd_s * MAX( 0.01, phi(ji,jj,jl) ) ) 
    1359          ztsu    = ptsu(ji,jj,jl)                                                ! Store current iteration temperature 
    1360          ztsu0   = ptsu(ji,jj,jl)                                                ! Store initial surface temperature 
    1361          zqa0    = qsr_ice(ji,jj,jl) - qtr_ice_top(ji,jj,jl) + qns_ice(ji,jj,jl) ! Net initial atmospheric heat flux 
    1362          ! 
    1363          DO iter = 1, nit     ! --- Iterative loop 
    1364             zqc   = zkeff_h * ( ztsu - ptb(ji,jj) )                              ! Conduction heat flux through snow-ice system (>0 downwards) 
    1365             zqnet = zqa0 + dqns_ice(ji,jj,jl) * ( ztsu - ptsu(ji,jj,jl) ) - zqc  ! Surface energy budget 
    1366             ztsu  = ztsu - zqnet / ( dqns_ice(ji,jj,jl) - zkeff_h )              ! Temperature update 
    1367          END DO 
    1368          ! 
    1369          ptsu   (ji,jj,jl) = MIN( rt0, ztsu ) 
    1370          qcn_ice(ji,jj,jl) = zkeff_h * ( ptsu(ji,jj,jl) - ptb(ji,jj) ) 
    1371          qns_ice(ji,jj,jl) = qns_ice(ji,jj,jl) + dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) 
    1372          qml_ice(ji,jj,jl) = ( qsr_ice(ji,jj,jl) - qtr_ice_top(ji,jj,jl) + qns_ice(ji,jj,jl) - qcn_ice(ji,jj,jl) )  & 
    1373             &   * MAX( 0._wp , SIGN( 1._wp, ptsu(ji,jj,jl) - rt0 ) ) 
    1374  
    1375          ! --- Diagnose the heat loss due to changing non-solar flux (as in icethd_zdf_bl99) --- ! 
    1376          hfx_err_dif(ji,jj) = hfx_err_dif(ji,jj) - ( dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) ) * a_i_b(ji,jj,jl) 
     1355            ! 
     1356            zkeff_h = zfac * zgfac(ji,jj,jl) / &                                    ! Effective conductivity of the snow-ice system divided by thickness 
     1357               &      ( rcnd_i * phs(ji,jj,jl) + rn_cnd_s * MAX( 0.01, phi(ji,jj,jl) ) ) 
     1358            ztsu    = ptsu(ji,jj,jl)                                                ! Store current iteration temperature 
     1359            ztsu0   = ptsu(ji,jj,jl)                                                ! Store initial surface temperature 
     1360            zqa0    = qsr_ice(ji,jj,jl) - qtr_ice_top(ji,jj,jl) + qns_ice(ji,jj,jl) ! Net initial atmospheric heat flux 
     1361            ! 
     1362            DO iter = 1, nit     ! --- Iterative loop 
     1363               zqc   = zkeff_h * ( ztsu - ptb(ji,jj) )                              ! Conduction heat flux through snow-ice system (>0 downwards) 
     1364               zqnet = zqa0 + dqns_ice(ji,jj,jl) * ( ztsu - ptsu(ji,jj,jl) ) - zqc  ! Surface energy budget 
     1365               ztsu  = ztsu - zqnet / ( dqns_ice(ji,jj,jl) - zkeff_h )              ! Temperature update 
     1366            END DO 
     1367            ! 
     1368            ptsu   (ji,jj,jl) = MIN( rt0, ztsu ) 
     1369            qcn_ice(ji,jj,jl) = zkeff_h * ( ptsu(ji,jj,jl) - ptb(ji,jj) ) 
     1370            qns_ice(ji,jj,jl) = qns_ice(ji,jj,jl) + dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) 
     1371            qml_ice(ji,jj,jl) = ( qsr_ice(ji,jj,jl) - qtr_ice_top(ji,jj,jl) + qns_ice(ji,jj,jl) - qcn_ice(ji,jj,jl) )  & 
     1372               &   * MAX( 0._wp , SIGN( 1._wp, ptsu(ji,jj,jl) - rt0 ) ) 
     1373 
     1374            ! --- Diagnose the heat loss due to changing non-solar flux (as in icethd_zdf_bl99) --- ! 
     1375            hfx_err_dif(ji,jj) = hfx_err_dif(ji,jj) - ( dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) ) * a_i_b(ji,jj,jl) 
    13771376 
    13781377         END_2D 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbcblk_skin_ecmwf.F90

    r13719 r13806  
    160160      REAL(wp) :: zalfa     !: thermal expansion coefficient of sea-water [1/K] 
    161161      REAL(wp) :: zdTwl_b, zdTwl_n  !: temp. diff. between "almost surface (right below viscous layer) and bottom of WL 
    162       REAL(wp) :: zfr, zeta  
    163       REAL(wp) :: zusw, zusw2  
    164       REAL(wp) :: zLa, zfLa  
    165       REAL(wp) :: flg, zwf, zQabs  
     162      REAL(wp) :: zfr, zeta 
     163      REAL(wp) :: zusw, zusw2 
     164      REAL(wp) :: zLa, zfLa 
     165      REAL(wp) :: flg, zwf, zQabs 
    166166      REAL(wp) :: ZA, ZB, zL1, zL2 
    167167      REAL(wp) :: zcst0, zcst1, zcst2, zcst3 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbcmod.F90

    r13655 r13806  
    4646   USE sbcssr         ! surface boundary condition: sea surface restoring 
    4747   USE sbcrnf         ! surface boundary condition: runoffs 
    48    USE sbcapr         ! surface boundary condition: atmo pressure  
     48   USE sbcapr         ! surface boundary condition: atmo pressure 
    4949   USE sbcfwb         ! surface boundary condition: freshwater budget 
    5050   USE icbstp         ! Icebergs 
     
    137137         WRITE(numout,*) '         ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
    138138         WRITE(numout,*) '         mixed forced-coupled     formulation       ln_mixcpl     = ', ln_mixcpl 
    139 !!gm  lk_oasis is controlled by key_oasis3  ===>>>  It shoud be removed from the namelist  
     139!!gm  lk_oasis is controlled by key_oasis3  ===>>>  It shoud be removed from the namelist 
    140140         WRITE(numout,*) '         OASIS coupling (with atm or sas)           lk_oasis      = ', lk_oasis 
    141141         WRITE(numout,*) '         components of your executable              nn_components = ', nn_components 
     
    162162      IF( .NOT.ln_wave ) THEN 
    163163         ln_sdw = .false. ; ln_cdgw = .false. ; ln_tauwoc = .false. ; ln_tauw = .false. ; ln_stcor = .false. 
    164       ENDIF  
     164      ENDIF 
    165165      IF( ln_sdw ) THEN 
    166166         IF( .NOT.(nn_sdrift==jp_breivik_2014 .OR. nn_sdrift==jp_li_2017 .OR. nn_sdrift==jp_peakfr) ) & 
     
    187187      !                       !**  check option consistency 
    188188      ! 
    189       IF(lwp) WRITE(numout,*)       !* Single / Multi - executable (NEMO / OPA+SAS)  
     189      IF(lwp) WRITE(numout,*)       !* Single / Multi - executable (NEMO / OPA+SAS) 
    190190      SELECT CASE( nn_components ) 
    191191      CASE( jp_iam_nemo ) 
     
    219219      SELECT CASE( nn_ice ) 
    220220      CASE( 0 )                        !- no ice in the domain 
    221       CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model)   
     221      CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model) 
    222222      CASE( 2 )                        !- SI3  ice model 
    223223         IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) )   & 
     
    227227            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 
    228228         IF( lk_agrif                                )   & 
    229             &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' )  
     229            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 
    230230      CASE DEFAULT                     !- not supported 
    231231      END SELECT 
    232       IF( ln_diurnal .AND. .NOT. ln_blk )   CALL ctl_stop( "sbc_init: diurnal flux processing only implemented for bulk forcing" ) 
     232      IF( ln_diurnal .AND. .NOT. (ln_blk.OR.ln_abl) )   CALL ctl_stop( "sbc_init: diurnal flux processing only implemented for bulk forcing" ) 
    233233      ! 
    234234      !                       !**  allocate and set required variables 
     
    242242      ! 
    243243      IF( sbc_ssr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_ssr arrays' ) 
    244       IF( .NOT.ln_ssr ) THEN               !* Initialize qrp and erp if no restoring  
     244      IF( .NOT.ln_ssr ) THEN               !* Initialize qrp and erp if no restoring 
    245245         qrp(:,:) = 0._wp 
    246246         erp(:,:) = 0._wp 
     
    331331         &   CALL ctl_warn( 'sbc_init : diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 
    332332      ! 
    333     
     333 
    334334      !                       !**  associated modules : initialization 
    335335      ! 
     
    395395      ! 
    396396      REAL(wp) ::     zthscl        ! wd  tanh scale 
    397       REAL(wp), DIMENSION(jpi,jpj) ::  zwdht, zwght  ! wd dep over wd limit, wgt   
     397      REAL(wp), DIMENSION(jpi,jpj) ::  zwdht, zwght  ! wd dep over wd limit, wgt 
    398398 
    399399      !!--------------------------------------------------------------------- 
     
    427427      ! 
    428428      !                                            !==  sbc formulation  ==! 
    429       !                                                    
     429      ! 
    430430      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition 
    431431      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx) 
    432       CASE( jp_usr   )     ;   CALL usrdef_sbc_oce( kt, Kbb )                        ! user defined formulation  
     432      CASE( jp_usr   )     ;   CALL usrdef_sbc_oce( kt, Kbb )                        ! user defined formulation 
    433433      CASE( jp_flx     )   ;   CALL sbc_flx       ( kt )                             ! flux formulation 
    434434      CASE( jp_blk     ) 
     
    447447      IF( ln_mixcpl )          CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice, Kbb, Kmm )  ! forced-coupled mixed formulation after forcing 
    448448      ! 
    449       IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )              ! Wind stress provided by waves  
     449      IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )              ! Wind stress provided by waves 
    450450      ! 
    451451      !                                            !==  Misc. Options  ==! 
     
    461461      IF( ln_icebergs    )   THEN 
    462462                                     CALL icb_stp( kt )           ! compute icebergs 
    463          ! Icebergs do not melt over the haloes.  
    464          ! So emp values over the haloes are no more consistent with the inner domain values.  
     463         ! Icebergs do not melt over the haloes. 
     464         ! So emp values over the haloes are no more consistent with the inner domain values. 
    465465         ! A lbc_lnk is therefore needed to ensure reproducibility and restartability. 
    466466         ! see ticket #2113 for discussion about this lbc_lnk. 
     
    476476      ! Special treatment of freshwater fluxes over closed seas in the model domain 
    477477      ! Should not be run if ln_diurnal_only 
    478       IF( l_sbc_clo      )   CALL sbc_clo( kt )    
     478      IF( l_sbc_clo      )   CALL sbc_clo( kt ) 
    479479 
    480480!!$!RBbug do not understand why see ticket 667 
     
    482482!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) 
    483483      IF( ll_wd ) THEN     ! If near WAD point limit the flux for now 
    484          zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999  
     484         zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999 
    485485         zwdht(:,:) = ssh(:,:,Kmm) + ht_0(:,:) - rn_wdmin1   ! do this calc of water 
    486486                                                     ! depth above wd limit once 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce+ice/namelist_ecmwf-cstc_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   !!    
    125125   ! Sea-ice specific: (IF: nn_ice >=1 ) 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce+ice/namelist_ecmwf-lg15_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   !!    
    125125   ! Sea-ice specific: (IF: nn_ice >=1 ) 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce+ice/namelist_ecmwf-lu12_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   !!    
    125125   ! Sea-ice specific: (IF: nn_ice >=1 ) 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce/namelist_andreas_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce/namelist_coare3p6_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce/namelist_ecmwf_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/ERA5_arctic/oce/namelist_ncar_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .true.  !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .false. !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/IDEALIZED/oce/namelist_andreas_cfg

    r13676 r13806  
    125125   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    126126   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    127    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     127   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    128128   ! 
    129129   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/IDEALIZED/oce/namelist_coare3p0_cfg

    r13676 r13806  
    125125   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    126126   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    127    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     127   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    128128   ! 
    129129   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/IDEALIZED/oce/namelist_coare3p6_cfg

    r13676 r13806  
    125125   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    126126   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    127    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     127   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    128128   ! 
    129129   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/IDEALIZED/oce/namelist_ecmwf_cfg

    r13676 r13806  
    125125   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    126126   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    127    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     127   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    128128   ! 
    129129   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/IDEALIZED/oce/namelist_ncar_cfg

    r13676 r13806  
    125125   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    126126   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    127    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     127   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    128128   ! 
    129129   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_andreas_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_coare3p6_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ecmwf_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ncar_cfg

    r13676 r13806  
    121121   ln_humi_dpt = .false. !  humidity "sn_humi" is dew-point temperature [K] 
    122122   ln_humi_rlh = .true.  !  humidity "sn_humi" is relative humidity     [%] 
    123    ln_tpot     = .true.  !!GS: compute potential temperature or not 
     123   ln_tair_pot = .false. !  air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.) 
    124124   ! 
    125125   cn_dir      = './'      !  root directory for the bulk data location 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/EXPREF/launch_sasf.sh

    r13781 r13806  
    3636 
    3737# MPI launch command for your system 
    38 # Even though we are running on 1 proc, NEMO has been compiled with MPI, so fill the following: 
     38# Even though we are running on 1 proc here, NEMO has likely been compiled with MPI, 
     39# if it's not the case then just leave "MPI_LAUNCH" void... 
    3940MPI_LAUNCH="mpirun -n 1" 
    4041 
    4142####### End of normal user configurable section ####### 
    42  
    4343#================================================================================ 
    4444 
     
    9797 
    9898SASF_EXPREF=`pwd`  ; # STATION_ASF EXPREF directory from which to use namelists and XIOS xml files... 
    99  
    10099 
    101100CFGS_SHARED="${NEMO_REF_DIR}/cfgs/SHARED" 
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/README.rst

    r13781 r13806  
    22=========================================== 
    33 
    4 Last successful test done with NEMOGCM trunk: ``r13263`` 
    5  
    6 Author: Laurent Brodeau, 2020 
    7  
    8 NOTE: if working with the trunk of NEMO, you are strongly advised to use 
    9 the same test-case but on the ``NEMO-examples`` GitHub depo: 
    10 `https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF <https://github.com/NEMO-ocean/NEMO-examples/tree/master/STATION_ASF>`__ 
     4.. raw:: html 
     5 
    116 
    127Objectives 
Note: See TracChangeset for help on using the changeset viewer.