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 14072 for NEMO/trunk/tests – NEMO

Changeset 14072 for NEMO/trunk/tests


Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

Location:
NEMO/trunk/tests
Files:
14 deleted
13 edited
19 copied

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/ICE_ADV1D/MY_SRC/usrdef_sbc.F90

    r13472 r14072  
    2020   USE ice, ONLY       : at_i_b, a_i_b 
    2121   USE icethd_dh       ! for CALL ice_thd_snwblow 
     22   USE sbc_phy, ONLY : pp_cldf 
    2223   ! 
    2324   USE in_out_manager  ! I/O manager 
     
    2627   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
    2728 
     29    
    2830   IMPLICIT NONE 
    2931   PRIVATE 
  • NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_sbc.F90

    r13472 r14072  
    2020   USE ice, ONLY       : at_i_b, a_i_b 
    2121   USE icethd_dh       ! for CALL ice_thd_snwblow 
     22   USE sbc_phy, ONLY : pp_cldf 
    2223   ! 
    2324   USE in_out_manager  ! I/O manager 
  • NEMO/trunk/tests/STATION_ASF/EXPREF/file_def_nemo-oce.xml

    r13132 r14072  
    11<?xml version="1.0"?> 
    2 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 
    32 
    4   <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     3<file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 
     4 
    55 
    66  <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."> <!-- 1h files --> 
     
    1616      <field field_ref="dt_skin"      name="dt_skin"  /> 
    1717      <!--    --> 
    18       <field field_ref="qt_oce"       name="qt"   /> 
    19       <field field_ref="qsr_oce"      name="qsr"  /> 
    20       <field field_ref="qns_oce"      name="qns"  /> 
    21       <field field_ref="qla_oce"      name="qla"  /> 
    22       <field field_ref="qsb_oce"      name="qsb"  /> 
    23       <field field_ref="qlw_oce"      name="qlw"  /> 
    24       <field field_ref="qemp_oce"     name="qemp" /> 
     18      <field field_ref="qt_oce"       name="qt_oce"   /> 
     19      <field field_ref="qsr_oce"      name="qsr_oce"  /> 
     20      <field field_ref="qns_oce"      name="qns_oce"  /> 
     21      <field field_ref="qla_oce"      name="qla_oce"  /> 
     22      <field field_ref="qsb_oce"      name="qsb_oce"  /> 
     23      <field field_ref="qlw_oce"      name="qlw_oce"  /> 
     24      <field field_ref="qemp_oce"     name="qemp_oce" /> 
    2525      <!-- --> 
    26       <field field_ref="evap_oce"     name="evap" /> 
     26      <field field_ref="evap_oce"     name="evap_oce" /> 
    2727      <field field_ref="precip"       name="precip" /> 
    28       <field field_ref="empmr"        name="empmr" /> 
     28      <!-- <field field_ref="empmr"   name="empmr" /> --> 
    2929      <!-- --> 
    30       <field field_ref="taum"         name="taum"   /> 
     30      <field field_ref="taum_oce"     name="taum"   /> 
     31      <field field_ref="utau_oce"     name="utau"   /> 
     32      <field field_ref="vtau_oce"     name="vtau"   /> 
    3133      <field field_ref="wspd"         name="windsp" /> 
    3234      <!-- --> 
     
    3436      <field field_ref="Ce_oce"       name="Ce_oce" /> 
    3537      <field field_ref="Ch_oce"       name="Ch_oce" /> 
     38      <!-- --> 
    3639      <field field_ref="theta_zt"     name="theta_zt" /> 
    3740      <field field_ref="q_zt"         name="q_zt" /> 
     
    4245    </file> 
    4346 
    44     <file id="file2" name_suffix="_gridU" description="ocean U grid variables" compression_level="3" > 
    45       <field field_ref="utau"         name="tauuo"    /> 
    46     </file> 
    47  
    48     <file id="file3" name_suffix="_gridV" description="ocean V grid variables" compression_level="3" > 
    49       <field field_ref="vtau"         name="tauvo"    /> 
    50     </file> 
    51  
    5247  </file_group> 
    5348 
    54   <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
    55   <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files --> 
    56   <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
    57   <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files --> 
    58   <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files --> 
    59   <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files --> 
    60   <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/> <!-- 5d files --> 
    61   <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files --> 
     49  <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     50  <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     51  <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files --> 
     52  <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
     53  <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files --> 
     54  <file_group id="1d"  output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files --> 
     55  <file_group id="3d"  output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files --> 
     56  <file_group id="5d"  output_freq="5d"  output_level="10" enabled=".TRUE."/> <!-- 5d files --> 
     57  <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files --> 
    6258  <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files --> 
    6359  <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files --> 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/diawri.F90

    r12615 r14072  
    387387      CALL iom_rstput( 0, 0, inum, 'sozotaux', utau              )    ! i-wind stress 
    388388      CALL iom_rstput( 0, 0, inum, 'sometauy', vtau              )    ! j-wind stress 
    389  
     389      ! 
     390      CALL iom_close( inum ) 
     391      ! 
    390392#if defined key_si3 
    391393      IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid 
     394         CALL iom_open( TRIM(cdfile_name)//'_ice', inum, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
    392395         CALL ice_wri_state( inum ) 
    393       ENDIF 
     396         CALL iom_close( inum ) 
     397      ENDIF 
     398      ! 
    394399#endif 
    395       ! 
    396       CALL iom_close( inum ) 
    397       ! 
    398400   END SUBROUTINE dia_wri_state 
    399401 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r13286 r14072  
    3030   USE step_c1d       ! Time stepping loop for the 1D configuration 
    3131   ! 
    32    USE prtctl         ! Print control 
    3332   USE in_out_manager ! I/O manager 
    3433   USE lib_mpp        ! distributed memory computing 
     
    4746   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
    4847 
     48#if defined key_mpp_mpi 
     49   ! need MPI_Wtime 
     50   INCLUDE 'mpif.h' 
     51#endif 
     52 
    4953   !!---------------------------------------------------------------------- 
    5054   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    51    !! $Id: nemogcm.F90 12489 2020-02-28 15:55:11Z davestorkey $ 
     55   !! $Id: nemogcm.F90 13286 2020-07-09 15:48:29Z smasson $ 
    5256   !! Software governed by the CeCILL license (see ./LICENSE) 
    5357   !!---------------------------------------------------------------------- 
     
    110114      ! 
    111115#if defined key_iomput 
    112                                     CALL xios_finalize  ! end mpp communications with xios 
     116      CALL xios_finalize  ! end mpp communications with xios 
    113117#else 
    114118      IF( lk_mpp )                  CALL mppstop      ! end mpp communications 
     
    146150#if defined key_iomput 
    147151      IF( Agrif_Root() ) THEN 
    148             CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
     152         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
    149153      ENDIF 
    150154      CALL mpp_start( ilocal_comm ) 
    151155#else 
    152          CALL mpp_start( ) 
     156      CALL mpp_start( ) 
    153157#endif 
    154158      ! 
     
    163167      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    164168      ! open reference and configuration namelist files 
    165                   CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
    166                   CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
     169      CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     170      CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    167171      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    168172      ! open /dev/null file to be able to supress output write easily 
    169173      IF( Agrif_Root() ) THEN 
    170                   CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     174         CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    171175#ifdef key_agrif 
    172176      ELSE 
    173                   numnul = Agrif_Parent(numnul)    
    174 #endif 
    175       ENDIF 
    176       ! 
     177         numnul = Agrif_Parent(numnul) 
     178#endif 
     179      ENDIF 
    177180      !                             !--------------------! 
    178181      !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp 
     
    215218         WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 
    216219         WRITE(numout,*) 
     220 
     221         ! Print the working precision to ocean.output 
     222         IF (wp == dp) THEN 
     223            WRITE(numout,*) "Working precision = double-precision" 
     224         ELSE 
     225            WRITE(numout,*) "Working precision = single-precision" 
     226         ENDIF 
     227         WRITE(numout,*) 
    217228         ! 
    218229         WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA 
     
    229240903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    230241      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    231 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     242904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 
    232243      ! 
    233244      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
     
    263274                           CALL     eos_init        ! Equation of state 
    264275      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
    265                            CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 
     276                           CALL     dom_init( Nbb, Nnn, Naa ) ! Domain 
    266277      IF( sn_cfctl%l_prtctl )   & 
    267278         &                 CALL prt_ctl_init        ! Print control 
    268       ! 
    269        
     279 
    270280                           CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers) 
    271281 
    272       !                                      ! external forcing  
     282      !                                      ! external forcing 
    273283                           CALL     sbc_init( Nbb, Nnn, Naa )    ! surface boundary conditions (including sea-ice) 
     284 
     285      !#LB: 
     286#if defined key_si3 
     287      IF(lwp) WRITE(numout,*) 'LOLO: nemo_init@nemogcm.F90: shape of fr_i ==>', SIZE(fr_i,1), SIZE(fr_i,2) 
     288      fr_i(:,:) = 0._wp 
     289#endif 
     290      !#LB. 
    274291 
    275292      ! 
     
    302319         WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc 
    303320         WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout 
    304          WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin   
    305          WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax   
    306          WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    307          WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
     321         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin 
     322         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax 
     323         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr 
     324         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
    308325         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    309326         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
     
    366383      !!---------------------------------------------------------------------- 
    367384      ! 
    368       ierr =        oce_alloc    ()    ! ocean  
     385      ierr =        oce_alloc    ()    ! ocean 
    369386      ierr = ierr + dia_wri_alloc() 
    370387      ierr = ierr + dom_oce_alloc()    ! ocean domain 
     
    375392   END SUBROUTINE nemo_alloc 
    376393 
    377     
     394 
    378395   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto ) 
    379396      !!---------------------------------------------------------------------- 
     
    399416   !!====================================================================== 
    400417END MODULE nemogcm 
    401  
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/sbcssm.F90

    r12629 r14072  
    1919   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2020   ! 
     21#if defined key_si3 
     22   USE ice            !#LB: we need to fill the "tm_su"   array! 
     23   USE sbc_ice        !#LB: we need to fill the "alb_ice" array! 
     24#endif 
     25   ! 
    2126   USE in_out_manager ! I/O manager 
    2227   USE iom            ! I/O library 
     
    4853   INTEGER     ::   jf_e3t         ! index of first T level thickness 
    4954   INTEGER     ::   jf_frq         ! index of fraction of qsr absorbed in the 1st T level 
     55#if defined key_si3 
     56   INTEGER     ::   jf_ifr         ! index of sea-ice concentration !#LB 
     57   INTEGER     ::   jf_tic         ! index of sea-ice surface temperature !#LB 
     58   INTEGER     ::   jf_ial         ! index of sea-ice surface albedo !#LB 
     59#endif 
    5060 
    5161   TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_ssm_3d  ! structure of input fields (file information, fields read) 
     
    5464   !!---------------------------------------------------------------------- 
    5565   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
    56    !! $Id: sbcssm.F90 12615 2020-03-26 15:18:49Z laurent $ 
     66   !! $Id: sbcssm.F90 13286 2020-07-09 15:48:29Z smasson $ 
    5767   !! Software governed by the CeCILL license (see ./LICENSE) 
    5868   !!---------------------------------------------------------------------- 
     
    7383      ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90) 
    7484      ! 
    75       INTEGER  ::   ji, jj    ! dummy loop indices 
     85      INTEGER  ::   ji, jj, jl ! dummy loop indices 
    7686      REAL(wp) ::   ztinta     ! ratio applied to after  records when doing time interpolation 
    7787      REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation 
     
    8494         IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==! 
    8595         ! 
    86          IF( ln_3d_uve ) THEN 
    87             IF( .NOT. ln_linssh ) THEN 
    88                e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
    89             ELSE 
    90                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
    91             ENDIF 
    92             ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    93             ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
    94          ELSE 
    95             IF( .NOT. ln_linssh ) THEN 
    96                e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
    97             ELSE 
    98                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
    99             ENDIF 
    100             ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    101             ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
    102          ENDIF 
    103          ! 
     96         e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
     97         ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
     98         ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
     99         ! 
     100         !#LB: 
     101#if defined key_si3 
     102         !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => fill "tm_su" and other fields at kt =', kt 
     103         !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => shape of at_i ==>', SIZE(at_i,1), SIZE(at_i,2) 
     104         at_i (:,:) = sf_ssm_2d(jf_ifr)%fnow(:,:,1) * tmask(:,:,1)    ! sea-ice concentration [fraction] 
     105         tm_su(:,:) = sf_ssm_2d(jf_tic)%fnow(:,:,1) * tmask(:,:,1)    ! sea-ice surface temperature, read in [K] !#LB 
     106         sst_m(:,:) = sf_ssm_2d(jf_ial)%fnow(:,:,1) * tmask(:,:,1)    ! !!!sst_m AS TEMPORARY ARRAY !!! sea-ice albedo [fraction] 
     107         DO jl = 1, jpl 
     108            !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => fill "t_su" for ice cat =', jl 
     109            a_i    (:,:,jl) = at_i (:,:) 
     110            a_i_b  (:,:,jl) = at_i (:,:) 
     111            t_su   (:,:,jl) = tm_su(:,:) 
     112            alb_ice(:,:,jl) = sst_m(:,:) 
     113         END DO 
     114         !IF(lwp) WRITE(numout,*) '' 
     115#endif 
     116         !#LB. 
    104117         sst_m(:,:) = sf_ssm_2d(jf_tem)%fnow(:,:,1) * tmask(:,:,1)    ! temperature 
    105118         sss_m(:,:) = sf_ssm_2d(jf_sal)%fnow(:,:,1) * tmask(:,:,1)    ! salinity 
    106119         ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
    107          IF( ln_read_frq ) THEN 
    108             frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1) ! solar penetration 
    109          ELSE 
    110             frq_m(:,:) = 1._wp 
    111          ENDIF 
     120         frq_m(:,:) = 1._wp 
    112121      ELSE 
    113122         sss_m(:,:) = 35._wp                             ! =35. to obtain a physical value for the freezing point 
     
    116125         ssv_m(:,:) = 0._wp 
    117126         ssh_m(:,:) = 0._wp 
    118          IF( .NOT. ln_linssh ) e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D 
    119127         frq_m(:,:) = 1._wp                              !              - - 
    120128         ssh  (:,:,Kmm) = 0._wp                              !              - - 
     
    136144         CALL prt_ctl(tab2d_1=ssv_m, clinfo1=' ssv_m   - : ', mask1=vmask   ) 
    137145         CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' ssh_m   - : ', mask1=tmask   ) 
    138          IF( .NOT.ln_linssh )   CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m   - : ', mask1=tmask   ) 
    139          IF( ln_read_frq    )   CALL prt_ctl(tab2d_1=frq_m, clinfo1=' frq_m   - : ', mask1=tmask   ) 
    140146      ENDIF 
    141147      ! 
     
    146152         CALL iom_put( 'sss_m', sss_m ) 
    147153         CALL iom_put( 'ssh_m', ssh_m ) 
    148          IF( .NOT.ln_linssh )   CALL iom_put( 'e3t_m', e3t_m ) 
    149          IF( ln_read_frq    )   CALL iom_put( 'frq_m', frq_m ) 
    150154      ENDIF 
    151155      ! 
     
    175179      TYPE(FLD_N) ::   sn_ssh, sn_e3t, sn_frq 
    176180      !! 
     181      TYPE(FLD_N) ::   sn_ifr, sn_tic, sn_ial 
     182      !! 
    177183      NAMELIST/namsbc_sas/ l_sasread, cn_dir, ln_3d_uve, ln_read_frq,   & 
    178          &                 sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
     184         &                 sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq, & 
     185         &                 sn_ifr, sn_tic, sn_ial 
    179186      !!---------------------------------------------------------------------- 
    180187      ! 
     
    196203         WRITE(numout,*) '   Namelist namsbc_sas' 
    197204         WRITE(numout,*) '      Initialisation using an input file                                 l_sasread   = ', l_sasread 
    198          WRITE(numout,*) '      Are we supplying a 3D u,v and e3 field                             ln_3d_uve   = ', ln_3d_uve 
    199          WRITE(numout,*) '      Are we reading frq (fraction of qsr absorbed in the 1st T level)   ln_read_frq = ', ln_read_frq 
    200205      ENDIF 
    201206      ! 
     
    218223         IF( lwp ) WRITE(numout,*) '         ==>>>   No freshwater budget adjustment needed with StandAlone Surface scheme' 
    219224         nn_fwb = 0 
     225      ENDIF 
     226      IF( ln_closea ) THEN 
     227         IF( lwp ) WRITE(numout,*) '         ==>>>   No closed seas adjustment needed with StandAlone Surface scheme' 
     228         ln_closea = .false. 
    220229      ENDIF 
    221230 
     
    230239         !! and the rest of the logic should still work 
    231240         ! 
    232          jf_tem = 1   ;   jf_ssh = 3   ! default 2D fields index 
    233          jf_sal = 2   ;   jf_frq = 4   ! 
    234          ! 
    235          IF( ln_3d_uve ) THEN 
    236             jf_usp = 1   ;   jf_vsp = 2   ;   jf_e3t = 3     ! define 3D fields index 
    237             nfld_3d  = 2 + COUNT( (/.NOT.ln_linssh/) )       ! number of 3D fields to read 
    238             nfld_2d  = 3 + COUNT( (/ln_read_frq/) )          ! number of 2D fields to read 
    239          ELSE 
    240             jf_usp = 4   ;   jf_e3t = 6                      ! update 2D fields index 
    241             jf_vsp = 5   ;   jf_frq = 6 + COUNT( (/.NOT.ln_linssh/) ) 
    242             ! 
    243             nfld_3d  = 0                                     ! no 3D fields to read 
    244             nfld_2d  = 5 + COUNT( (/.NOT.ln_linssh/) ) + COUNT( (/ln_read_frq/) )    ! number of 2D fields to read 
    245          ENDIF 
     241         !#LB: 
     242         jf_tem = 1 
     243         jf_sal = 2 
     244         jf_ssh = 3 
     245         jf_usp = 4 
     246         jf_vsp = 5 
     247         ! 
     248         nfld_3d  = 0 
     249         nfld_2d  = 5 
     250         ! 
     251#if defined key_si3 
     252         jf_ifr = jf_vsp + 1 
     253         jf_tic = jf_vsp + 2 
     254         jf_ial = jf_vsp + 3 
     255         nfld_2d = nfld_2d + 3 
     256 
     257         !IF(lwp) WRITE(numout,*) 'LOLO: nfld_2d =', nfld_2d 
     258         !IF(lwp) WRITE(numout,*) 'LOLO: jf_tem =', jf_tem 
     259         !IF(lwp) WRITE(numout,*) 'LOLO: jf_sal =', jf_sal 
     260         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ssh =', jf_ssh 
     261         !IF(lwp) WRITE(numout,*) 'LOLO: jf_usp =', jf_usp 
     262         !IF(lwp) WRITE(numout,*) 'LOLO: jf_vsp =', jf_vsp 
     263         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ifr =', jf_ifr 
     264         !IF(lwp) WRITE(numout,*) 'LOLO: jf_tic =', jf_tic 
     265         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ial =', jf_ial 
     266         !IF(lwp) WRITE(numout,*) '' 
     267#endif 
     268         !#LB. 
    246269         ! 
    247270         IF( nfld_3d > 0 ) THEN 
     
    252275            slf_3d(jf_usp) = sn_usp 
    253276            slf_3d(jf_vsp) = sn_vsp 
    254             IF( .NOT.ln_linssh )   slf_3d(jf_e3t) = sn_e3t 
    255277         ENDIF 
    256278         ! 
     
    261283            ENDIF 
    262284            slf_2d(jf_tem) = sn_tem   ;   slf_2d(jf_sal) = sn_sal   ;   slf_2d(jf_ssh) = sn_ssh 
    263             IF( ln_read_frq )   slf_2d(jf_frq) = sn_frq 
    264             IF( .NOT. ln_3d_uve ) THEN 
    265                slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 
    266                IF( .NOT.ln_linssh )   slf_2d(jf_e3t) = sn_e3t 
    267             ENDIF 
     285            slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 
    268286         ENDIF 
     287         ! 
     288#if defined key_si3 
     289         slf_2d(jf_ifr) = sn_ifr   !#LB 
     290         slf_2d(jf_tic) = sn_tic   !#LB 
     291         slf_2d(jf_ial) = sn_ial   !#LB 
     292#endif 
    269293         ! 
    270294         ierr1 = 0    ! default definition if slf_?d(ifpr)%ln_tint = .false. 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/step_c1d.F90

    r13226 r14072  
    77   !!             3.0  !  2008-04  (G. Madec)  redo the adaptation to include SBC 
    88   !!             4.1  !  2019-08  (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 
    9    !!             4.1  !  2019-12  (L. Brodeau) STATION_ASF test-case 
     9   !!             4.x  !  2020-11  (L. Brodeau) STATION_ASF test-case 
    1010   !!---------------------------------------------------------------------- 
    1111#if defined key_c1d 
     
    2222   PRIVATE 
    2323 
    24    PUBLIC stp_c1d   ! called by nemogcm.F90 
     24   PUBLIC stp_c1d      ! called by nemogcm.F90 
    2525 
    2626   !!---------------------------------------------------------------------- 
    2727   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    28    !! $Id: step_c1d.F90 12377 2020-02-12 14:39:06Z acc $ 
     28   !! $Id: step_c1d.F90 13802 2020-11-17 09:21:55Z gsamson $ 
    2929   !! Software governed by the CeCILL license (see ./LICENSE) 
    3030   !!---------------------------------------------------------------------- 
     
    5151      ! 
    5252      INTEGER ::   jk       ! dummy loop indice 
    53       INTEGER ::   indic    ! error indicator if < 0 
    5453      !! --------------------------------------------------------------------- 
    55  
    56       indic = 0                ! reset to no error condition 
    5754      IF( kstp == nit000 )   CALL iom_init( "nemo")   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    5855      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
    59       CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
     56                             CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
    6057 
    6158      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6259      ! Update data, open boundaries, surface boundary condition (including sea-ice) 
    6360      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    64       CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice) 
     61                         CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice) 
    6562 
    6663      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6764      ! diagnostics and outputs 
    6865      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    69       CALL dia_wri( kstp, Nnn )  ! ocean model: outputs 
     66                         CALL dia_wri( kstp, Nnn )  ! ocean model: outputs 
    7067 
    7168      ! Swap time levels 
     
    7875      ! Control and restarts 
    7976      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    80       CALL stp_ctl( kstp, Nnn ) 
    81  
     77                             CALL stp_ctl( kstp, Nnn ) 
    8278      IF( kstp == nit000 )   CALL iom_close( numror )          ! close input  ocean restart file 
    8379      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/stpctl.F90

    r13616 r14072  
    4343      !!---------------------------------------------------------------------- 
    4444      !!                    ***  ROUTINE stp_ctl  *** 
    45       !!                      
     45      !! 
    4646      !! ** Purpose :   Control the run 
    4747      !! 
     
    6363      INTEGER , DIMENSION(4)          ::   iareasum, iareamin, iareamax 
    6464      INTEGER , DIMENSION(3,3)        ::   iloc                                  ! min/max loc indices 
    65       REAL(wp)                        ::   zzz                                   ! local real  
     65      REAL(wp)                        ::   zzz                                   ! local real 
    6666      REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
    6767      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
     
    7272      ! 
    7373      ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    74       ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
     74      ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1 
    7575      ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
    7676      ! 
     
    9898            istatus = NF90_ENDDEF(nrunid) 
    9999         ENDIF 
    100          !     
     100         ! 
    101101      ENDIF 
    102102      ! 
     
    158158            IF( lwm .AND. kt /= nitend )   istatus = NF90_CLOSE(nrunid) 
    159159            ! get global loc on the min/max 
    160             CALL mpp_maxloc( 'stpctl',    taum(:,:)  , llmsk, zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
     160            CALL mpp_maxloc( 'stpctl',    taum(:,:)  , llmsk, zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F 
    161161            CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk, zzz, iloc(1:2,2) ) 
    162162            CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk, zzz, iloc(1:2,3) ) 
     
    194194         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    195195         ! 
    196          IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    197             IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    198             ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     196         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
     197            IF(lwp) THEN 
     198               CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
     199            ELSE 
     200               nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
    199201            ENDIF 
    200202         ELSE                                    ! only mpi subdomains with errors are here -> STOP now 
     
    235237      !!---------------------------------------------------------------------- 
    236238      WRITE(clkt , '(i9)') kt 
    237        
     239 
    238240      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij  ,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
    239       !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
     241!!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
    240242      cl4 = '(i'//clfmt//')'   ;   WRITE(clsum, cl4) ksum 
    241243      WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1    ! how many digits to we need to write ? (we decide max = 9) 
    242244      cl4 = '(i'//clfmt//')'   ;   WRITE(clmin, cl4) kmin-1 
    243                                    WRITE(clmax, cl4) kmax-1 
     245      WRITE(clmax, cl4) kmax-1 
    244246      ! 
    245247      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpiglo,wp))) + 1      ! how many digits to we need to write jpiglo? (we decide max = 9) 
     
    257259      ELSE 
    258260         WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpk,wp))) + 1      ! how many digits to we need to write jpk? (we decide max = 9) 
    259          !!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
     261!!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
    260262         cl4 = '(i'//clfmt//')'   ;   WRITE(clk, cl4) kloc(3)   ! this is ok with AGRIF 
    261263         WRITE(cdline,9400) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj),    TRIM(clk), TRIM(clsuff) 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/usrdef_hgr.F90

    r13286 r14072  
    1212 
    1313   !!---------------------------------------------------------------------- 
    14    !!   usr_def_hgr   : initialize the horizontal mesh  
     14   !!   usr_def_hgr   : initialize the horizontal mesh 
    1515   !!---------------------------------------------------------------------- 
     16   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    1617   USE c1d      ,  ONLY: rn_lon1d, rn_lat1d ! ocean lon/lat define by namelist 
    1718   USE par_oce        ! ocean space and time domain 
     
    2122   USE in_out_manager ! I/O manager 
    2223   USE lib_mpp        ! MPP library 
    23     
     24 
    2425   IMPLICIT NONE 
    2526   PRIVATE 
     
    2930   !!---------------------------------------------------------------------- 
    3031   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    31    !! $Id: usrdef_hgr.F90 12489 2020-02-28 15:55:11Z davestorkey $  
     32   !! $Id: usrdef_hgr.F90 13216 2020-07-02 09:25:49Z rblod $ 
    3233   !! Software governed by the CeCILL license (see ./LICENSE) 
    3334   !!---------------------------------------------------------------------- 
     
    4849      !! 
    4950      !!                Here STATION_ASF configuration : 
    50       !!          Rectangular 3x3 domain  
     51      !!          Rectangular 3x3 domain 
    5152      !!          - Located at 150E-50N 
    52       !!          - a constant horizontal resolution   
     53      !!          - a constant horizontal resolution 
    5354      !! 
    54       !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees)  
     55      !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees) 
    5556      !!              - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) 
    5657      !!              - define i- & j-scale factors at t-, u-, v- and f-points (in meters) 
     
    6364      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1t, pe1u, pe1v, pe1f       ! i-scale factors                             [m] 
    6465      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe2t, pe2u, pe2v, pe2f       ! j-scale factors                             [m] 
    65       INTEGER                 , INTENT(out) ::   ke1e2u_v                     ! =1 u- & v-surfaces computed here, =0 otherwise  
     66      INTEGER                 , INTENT(out) ::   ke1e2u_v                     ! =1 u- & v-surfaces computed here, =0 otherwise 
    6667      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6768      ! 
     
    7778      !                       ! longitude 
    7879      plamt(:,:) = rn_lon1d 
    79       plamu(:,:) = rn_lon1d  
     80      plamu(:,:) = rn_lon1d 
    8081      plamv(:,:) = rn_lon1d 
    8182      plamf(:,:) = rn_lon1d 
     
    9394      pe1f(:,:) = 100.  ;   pe2f(:,:) = 100. 
    9495      ! 
    95       !                                         ! NO reduction of grid size in some straits  
     96      !                                         ! NO reduction of grid size in some straits 
    9697      ke1e2u_v = 0                              !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
    9798      pe1e2u(:,:) = 0._wp                       !    CAUTION: set to zero to avoid error with some compilers that 
     
    100101      ! 
    101102      !                       !==  Coriolis parameter  ==! 
    102       zf0   = 2._wp * omega * SIN( rad * rn_lat1d )       
     103      zf0   = 2._wp * omega * SIN( rad * rn_lat1d ) 
    103104      pff_f(:,:) = zf0 
    104       pff_t(:,:) = zf0       
     105      pff_t(:,:) = zf0 
    105106      kff = 1                 !  indicate to skip computing Coriolis parameter afterward 
    106107      ! 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r13286 r14072  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   usr_def_nam   : read user defined namelist and set global domain size 
    15    !!   usr_def_hgr   : initialize the horizontal mesh  
     15   !!   usr_def_hgr   : initialize the horizontal mesh 
    1616   !!---------------------------------------------------------------------- 
     17   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    1718   USE par_oce        ! ocean space and time domain 
    1819   USE phycst         ! physical constants 
     
    2021   USE in_out_manager ! I/O manager 
    2122   USE lib_mpp        ! MPP library 
    22     
     23 
    2324   IMPLICIT NONE 
    2425   PRIVATE 
     
    3132   !!---------------------------------------------------------------------- 
    3233   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    33    !! $Id: usrdef_nam.F90 12377 2020-02-12 14:39:06Z acc $  
     34   !! $Id: usrdef_nam.F90 13216 2020-07-02 09:25:49Z rblod $ 
    3435   !! Software governed by the CeCILL license (see ./LICENSE) 
    3536   !!---------------------------------------------------------------------- 
     
    3940      !!---------------------------------------------------------------------- 
    4041      !!                     ***  ROUTINE dom_nam  *** 
    41       !!                     
     42      !! 
    4243      !! ** Purpose :   read user defined namelist and define the domain size 
    4344      !! 
     
    5051      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
    5152      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
    52       INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    53       INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     53      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
     54      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c. 
    5455      ! 
    5556      INTEGER ::   ios   ! Local integer 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/usrdef_zgr.F90

    r12629 r14072  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   usr_def_zgr   : user defined vertical coordinate system 
    15    !!      zgr_z      : reference 1D z-coordinate  
     15   !!      zgr_z      : reference 1D z-coordinate 
    1616   !!      zgr_top_bot: ocean top and bottom level indices 
    1717   !!      zgr_zco    : 3D verticl coordinate in pure z-coordinate case 
     
    3131   !!---------------------------------------------------------------------- 
    3232   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    33    !! $Id: usrdef_zgr.F90 12377 2020-02-12 14:39:06Z acc $ 
     33   !! $Id: usrdef_zgr.F90 13226 2020-07-02 14:24:31Z orioltp $ 
    3434   !! Software governed by the CeCILL license (see ./LICENSE) 
    3535   !!---------------------------------------------------------------------- 
     
    5454      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pdept, pdepw                ! grid-point depth        [m] 
    5555      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3t , pe3u , pe3v , pe3f   ! vertical scale factors  [m] 
    56       REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3w , pe3uw, pe3vw         ! i-scale factors  
     56      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3w , pe3uw, pe3vw         ! i-scale factors 
    5757      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top, k_bot                ! first & last ocean level 
    5858      !!---------------------------------------------------------------------- 
     
    8585      pe3uw(:,:,1) = rn_dept1  ! LB??? 
    8686      pe3vw(:,:,1) = rn_dept1  ! LB??? 
    87        
     87 
    8888      !! 2nd level, technically useless (only for the sake of code stability) 
    8989      pdept_1d(2) = 3._wp*rn_dept1 
  • NEMO/trunk/tests/STATION_ASF/cpp_STATION_ASF.fcm

    r11853 r14072  
    1  bld::tool::fppkeys   key_c1d key_iomput 
     1 bld::tool::fppkeys   key_si3 key_c1d key_iomput key_mpp_mpi 
  • NEMO/trunk/tests/demo_cfgs.txt

    r14053 r14072  
    1010WAD OCE 
    1111BENCH OCE ICE TOP 
    12 STATION_ASF OCE 
     12STATION_ASF OCE ICE 
    1313CPL_OASIS  OCE TOP ICE NST 
    1414SWG OCE SWE 
Note: See TracChangeset for help on using the changeset viewer.