Changeset 15574 for NEMO/branches/2021/dev_r14318_RK3_stage1/tests
- Timestamp:
- 2021-12-03T20:32:50+01:00 (3 years ago)
- Location:
- NEMO/branches/2021/dev_r14318_RK3_stage1
- Files:
-
- 4 deleted
- 112 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14318_RK3_stage1
- Property svn:externals
-
old new 9 9 10 10 # SETTE 11 ^/utils/CI/sette@14244 sette 11 ^/utils/CI/sette@HEAD sette 12
-
- Property svn:externals
-
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca025_like
r14229 r15574 18 18 nn_jsize = 1206 !! 1049 ! number of point in j-direction of global(local) domain if >0 (<0) 19 19 nn_ksize = 75 ! total number of point in k-direction 20 nn_perio = 4 ! periodicity 20 ln_Iperio = .true. ! i-periodicity 21 ln_Jperio = .false. ! j-periodicity 22 ln_NFold = .true. ! North pole folding 23 cn_NFtype = 'T' ! Folding type: T or F 21 24 / 22 25 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca12_like
r14229 r15574 18 18 nn_jsize = 3146 ! number of point in j-direction of global(local) domain if >0 (<0) 19 19 nn_ksize = 75 ! total number of point in k-direction 20 nn_perio = 4 ! periodicity 20 ln_Iperio = .true. ! i-periodicity 21 ln_Jperio = .false. ! j-periodicity 22 ln_NFold = .true. ! North pole folding 23 cn_NFtype = 'T' ! Folding type: T or F 21 24 / 22 25 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/EXPREF/namelist_cfg_orca1_like
r14229 r15574 18 18 nn_jsize = 331 ! number of point in j-direction of global(local) domain if >0 (<0) 19 19 nn_ksize = 75 ! total number of point in k-direction 20 nn_perio = 6 ! periodicity 20 ln_Iperio = .true. ! i-periodicity 21 ln_Jperio = .false. ! j-periodicity 22 ln_NFold = .true. ! North pole folding 23 cn_NFtype = 'F' ! Folding type: T or F 21 24 / 22 25 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_hgr.F90
r14223 r15574 62 62 ! 63 63 INTEGER :: ji, jj ! dummy loop indices 64 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 64 65 REAL(wp) :: zres, zf0 65 66 REAL(wp) :: zti, ztj ! local scalars … … 72 73 IF(lwp) WRITE(numout,*) ' given by rn_dx and rn_dy' 73 74 ! 75 ! define unique value on each point of the inner global domain. z2d ranging from 0.05 to -0.05 76 ! 77 DO_2D( 0, 0, 0, 0 ) ! +/- 0.5 78 z2d(ji,jj) = 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) 79 END_2D 80 ! 74 81 ! Position coordinates (in grid points) 75 82 ! ========== 76 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls)83 DO_2D( 0, 0, 0, 0 ) 77 84 78 zti = REAL( mig0(ji), wp ) - 0.5_wp ! start at i=0.5 in the global grid without halos79 ztj = REAL( mjg0(jj), wp ) - 0.5_wp ! start at j=0.5 in the global grid without halos85 zti = REAL( mig0(ji), wp ) - 0.5_wp ! start at i=0.5 in the global grid without halos 86 ztj = REAL( mjg0(jj), wp ) - 0.5_wp ! start at j=0.5 in the global grid without halos 80 87 81 plamt(ji,jj) = zti82 plamu(ji,jj) = zti + 0.5_wp83 plamv(ji,jj) = zti84 plamf(ji,jj) = zti + 0.5_wp88 plamt(ji,jj) = zti * (1. + 1.0e-5 * z2d(ji,jj) ) 89 plamu(ji,jj) = ( zti + 0.5_wp ) * (1. + 2.0e-5 * z2d(ji,jj) ) 90 plamv(ji,jj) = zti * (1. + 3.0e-5 * z2d(ji,jj) ) 91 plamf(ji,jj) = ( zti + 0.5_wp ) * (1. + 4.0e-5 * z2d(ji,jj) ) 85 92 86 pphit(ji,jj) = ztj87 pphiu(ji,jj) = ztj88 pphiv(ji,jj) = ztj + 0.5_wp89 pphif(ji,jj) = ztj + 0.5_wp93 pphit(ji,jj) = ztj * (1. + 1.5e-5 * z2d(ji,jj) ) 94 pphiu(ji,jj) = ztj * (1. + 2.5e-5 * z2d(ji,jj) ) 95 pphiv(ji,jj) = ( ztj + 0.5_wp ) * (1. + 3.5e-5 * z2d(ji,jj) ) 96 pphif(ji,jj) = ( ztj + 0.5_wp ) * (1. + 4.5e-5 * z2d(ji,jj) ) 90 97 91 98 END_2D … … 93 100 ! Horizontal scale factors (in meters) 94 101 ! ====== 95 zres = 1.e+5 ! 100km 96 pe1t(:,:) = zres ; pe2t(:,:) = zres 97 pe1u(:,:) = zres ; pe2u(:,:) = zres 98 pe1v(:,:) = zres ; pe2v(:,:) = zres 99 pe1f(:,:) = zres ; pe2f(:,:) = zres 100 102 DO_2D( 0, 0, 0, 0 ) 103 zres = 1.e+5 ! 100km 104 pe1t(ji,jj) = zres * (1. + 1.0e-5 * z2d(ji,jj) ) ; pe2t(ji,jj) = zres * (1. + 1.5e-5 * z2d(ji,jj) ) 105 pe1u(ji,jj) = zres * (1. + 2.0e-5 * z2d(ji,jj) ) ; pe2u(ji,jj) = zres * (1. + 2.5e-5 * z2d(ji,jj) ) 106 pe1v(ji,jj) = zres * (1. + 3.0e-5 * z2d(ji,jj) ) ; pe2v(ji,jj) = zres * (1. + 3.5e-5 * z2d(ji,jj) ) 107 pe1f(ji,jj) = zres * (1. + 4.0e-5 * z2d(ji,jj) ) ; pe2f(ji,jj) = zres * (1. + 4.5e-5 * z2d(ji,jj) ) 108 END_2D 101 109 ! ! NO reduction of grid size in some straits 102 110 ke1e2u_v = 0 ! ==>> u_ & v_surfaces will be computed in dom_hgr routine … … 109 117 ! 110 118 zf0 = 2._wp * omega * SIN( rad * 45 ) ! constant coriolis factor corresponding to 45°N 111 pff_f(:,:) = zf0 112 pff_t(:,:) = zf0 119 DO_2D( 0, 0, 0, 0 ) 120 pff_f(ji,jj) = zf0 * (1. + 1.0e-5 * z2d(ji,jj) ) 121 pff_t(ji,jj) = zf0 * (1. + 2.0e-5 * z2d(ji,jj) ) 122 END_2D 123 ! 124 ! calls lbc_lnk done in dom_hgr 113 125 ! 114 126 END SUBROUTINE usr_def_hgr -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_nam.F90
r13286 r15574 29 29 CONTAINS 30 30 31 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)31 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 32 32 !!---------------------------------------------------------------------- 33 33 !! *** ROUTINE dom_nam *** … … 41 41 !! ** input : - namusr_def namelist found in namelist_cfg 42 42 !!---------------------------------------------------------------------- 43 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 44 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 45 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 46 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 47 ! 43 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 44 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 45 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 46 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 47 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 48 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 48 49 ! 49 50 INTEGER :: ios ! Local integer … … 52 53 INTEGER :: nn_jsize ! number of point in j-direction of global(local) domain if >0 (<0) 53 54 INTEGER :: nn_ksize ! total number of point in k-direction 54 INTEGER :: nn_perio ! periodicity55 55 ! !!* nammpp namelist *!! 56 56 INTEGER :: jpni, jpnj 57 LOGICAL :: ln_nnogather, ln_listonly 57 LOGICAL :: ln_listonly 58 LOGICAL :: ln_Iperio, ln_Jperio 59 LOGICAL :: ln_NFold 60 character(len=1) :: cn_NFtype 58 61 !! 59 NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio60 NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly 62 NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, ln_Iperio, ln_Jperio, ln_NFold, cn_NFtype 63 NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm 61 64 !!---------------------------------------------------------------------- 62 65 ! … … 83 86 kpj = nn_jsize 84 87 ENDIF 88 kpk = nn_ksize 85 89 ! 86 kpk = nn_ksize 87 kperio = nn_perio 90 ldIperio = ln_Iperio ; ldJperio = ln_Jperio 91 ldNFold = ln_NFold ; cdNFtype = cn_NFtype 92 ! 88 93 ! ! control print 89 94 IF(lwp) THEN … … 107 112 ENDIF 108 113 WRITE(numout,*) ' global domain size-z nn_ksize = ', nn_ksize 109 WRITE(numout,*) ' LBC of the global domain kperio = ', kperio114 WRITE(numout,*) ' ' 110 115 ENDIF 111 116 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_sbc.F90
r14273 r15574 110 110 END_2D 111 111 112 CALL lbc_lnk _multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. )112 CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 113 113 #endif 114 114 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/BENCH/MY_SRC/usrdef_zgr.F90
r13286 r15574 197 197 ! 198 198 199 !!$ IF( jperio == 3 .OR. jperio == 4) THEN ! add a small island in the upper corners to avoid model instabilities...200 !!$ z2d(mi0( nn_hls):mi1( nn_hls+2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 201 !!$ z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 202 !!$ z2d(mi0(jpiglo/2 ):mi1( jpiglo/2 +2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 199 !!$ IF( c_NFtype == 'T' ) THEN ! add a small island in the upper corners to avoid model instabilities... 200 !!$ z2d(mi0( nn_hls):mi1( nn_hls+2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0._wp 201 !!$ z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0._wp 202 !!$ z2d(mi0(jpiglo/2 ):mi1( jpiglo/2 +2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0._wp 203 203 !!$ ENDIF 204 204 !!$ ! 205 !!$ IF( jperio == 5 .OR. jperio == 6 ) THEN ! add a small island in the upper corners to avoid model instabilities... 206 !!$ z2d(mi0( nn_hls):mi1( nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 207 !!$ z2d(mi0(jpiglo-nn_hls):mi1(jpiglo-nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 208 !!$ z2d(mi0(jpiglo/2 ):mi1(jpiglo/2 +1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 209 !!$ ENDIF 210 211 ! 212 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (here jperio=0 ==>> closed) 205 IF( c_NFtype == 'F' ) THEN ! Must mask the 2 pivot-points 206 z2d(mi0(nn_hls+1):mi1(nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls)) = 0._wp 207 z2d(mi0(jpiglo/2):mi1(jpiglo/2),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls)) = 0._wp 208 ENDIF 209 ! 210 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1._wp ) ! set surrounding land to zero (closed boundaries) 213 211 ! 214 212 k_bot(:,:) = INT( z2d(:,:) ) ! =jpkm1 over the ocean point, =0 elsewhere -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/EXP00/file_def_nemo-oce.xml
r14025 r15574 21 21 <file_group id="4h" output_freq="4h" output_level="10" enabled=".TRUE."/> <!-- 4h files --> 22 22 23 <file_group id="6h" output_freq="6h" output_level="10" enabled=".TRUE."> <!-- 6h files --> 23 <file_group id="6h" output_freq="6h" output_level="10" enabled=".FALSE."> <!-- 6h files --> 24 24 25 <file id="file61" name_suffix="_grid_T" description="ocean T grid variables" > 25 26 <field field_ref="e3t" /> 26 <field field_ref="toce" name="votemper" operation="instant" freq_op=" 1d" > @toce_e3t / @e3t </field>27 <field field_ref="soce" name="vosaline" operation="instant" freq_op=" 1d" > @soce_e3t / @e3t </field>27 <field field_ref="toce" name="votemper" operation="instant" freq_op="6h" > @toce_e3t / @e3t </field> 28 <field field_ref="soce" name="vosaline" operation="instant" freq_op="6h" > @soce_e3t / @e3t </field> 28 29 <field field_ref="mldkz5" /> 29 30 <field field_ref="mldr10_1" /> … … 37 38 <field field_ref="precip" name="precip" /> 38 39 </file> 40 39 41 </file_group> 40 42 41 43 42 <file_group id="12h" output_freq="12h" output_level="10" enabled=". TRUE."> <!-- 1dfiles -->44 <file_group id="12h" output_freq="12h" output_level="10" enabled=".FALSE."> <!-- 12h files --> 43 45 44 46 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 47 <field field_ref="e3t" /> 48 <field field_ref="toce" name="votemper" operation="instant" freq_op="12h" > @toce_e3t / @e3t </field> 49 <field field_ref="soce" name="vosaline" operation="instant" freq_op="12h" > @soce_e3t / @e3t </field> 50 <field field_ref="mldkz5" /> 51 <field field_ref="mldr10_1" /> 52 <field field_ref="empmr" name="wfo" /> 53 <field field_ref="qsr_oce" name="qsr_oce" /> 54 <field field_ref="qns_oce" name="qns_oce" /> 55 <field field_ref="qt_oce" name="qt_oce" /> 56 <field field_ref="saltflx" name="sfx" /> 57 <field field_ref="taum" name="taum" /> 58 <field field_ref="wspd" name="windsp" /> 59 <field field_ref="precip" name="precip" /> 60 </file> 61 62 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 63 <field field_ref="uoce" name="uo" operation="instant" freq_op="12h" > @uoce_e3u / @e3u </field> 64 <field field_ref="utau" name="tauuo" /> 65 </file> 66 67 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 68 <field field_ref="voce" name="vo" operation="instant" freq_op="12h" > @voce_e3v / @e3v </field> 69 <field field_ref="vtau" name="tauvo" /> 70 </file> 71 72 <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 73 <field field_ref="e3w" /> 74 <field field_ref="avt" name="difvho" /> 75 </file> 76 77 </file_group> 78 79 80 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files --> 81 82 <file id="file60" name_suffix="_grid_T" description="ocean T grid variables" > 45 83 <field field_ref="e3t" /> 46 84 <field field_ref="toce" name="votemper" operation="instant" freq_op="1d" > @toce_e3t / @e3t </field> … … 58 96 </file> 59 97 60 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >61 <field field_ref="uoce" name="uo" operation="instant" freq_op="1d" > @uoce_e3u / @e3u </field>62 <field field_ref="utau" name="tauuo" />63 </file>64 65 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >66 <field field_ref="voce" name="vo" operation="instant" freq_op="1d" > @voce_e3v / @e3v </field>67 <field field_ref="vtau" name="tauvo" />68 </file>69 70 <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" >71 <field field_ref="e3w" />72 <field field_ref="avt" name="difvho" />73 </file>74 75 </file_group>76 77 78 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files -->79 <file id="file60" name_suffix="_grid_T" description="ocean T grid variables" >80 <field field_ref="e3t" />81 <field field_ref="toce" name="votemper" operation="instant" freq_op="1d" > @toce_e3t / @e3t </field>82 <field field_ref="soce" name="vosaline" operation="instant" freq_op="1d" > @soce_e3t / @e3t </field>83 <field field_ref="mldkz5" />84 <field field_ref="mldr10_1" />85 <field field_ref="empmr" name="wfo" />86 <field field_ref="qsr_oce" name="qsr_oce" />87 <field field_ref="qns_oce" name="qns_oce" />88 <field field_ref="qt_oce" name="qt_oce" />89 <field field_ref="saltflx" name="sfx" />90 <field field_ref="taum" name="taum" />91 <field field_ref="wspd" name="windsp" />92 <field field_ref="precip" name="precip" />93 </file>94 98 </file_group> 95 99 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/EXP00/namelist_cfg
r14229 r15574 5 5 !! namelists 2 - Surface boundary (namsbc, namsbc_flx, namsbc_blk, namsbc_cpl, 6 6 !! namsbc_sas, namtra_qsr, namsbc_rnf, 7 !! nam sbc_isf, namsbc_iscpl, namsbc_apr,7 !! namisf, namsbc_apr, 8 8 !! namsbc_ssr, namsbc_wave, namberg) 9 9 !! 3 - lateral boundary (namlbc, namagrif, nambdy, nambdy_tide) … … 26 26 !! namtsd data: temperature & salinity (default: OFF) 27 27 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 28 !! namc1d 1D configuration options ( "key_c1d")29 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")30 !! namc1d_uvd 1D data (currents) ( "key_c1d")28 !! namc1d 1D configuration options (ln_c1d =T) 29 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 30 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 31 31 !!====================================================================== 32 32 ! … … 49 49 &namdom ! time and space domain 50 50 !----------------------------------------------------------------------- 51 ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time51 ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time 52 52 ! 53 rn_Dt = 360. ! time step for the dynamics and tracer 53 rn_Dt = 360. ! time step for the dynamics and tracer 54 ln_c1d = .true. ! Single column domain (1x1pt) (T => fill namc1d) 54 55 / 55 56 !----------------------------------------------------------------------- … … 79 80 / 80 81 !----------------------------------------------------------------------- 81 &namc1d ! 1D configuration options ("key_c1d" default: PAPA station) 82 !----------------------------------------------------------------------- 83 rn_lat1d = 30 ! Column latitude 84 rn_lon1d = 15 ! Column longitude 85 ln_c1d_locpt = .true. ! Localization of 1D config in a grid (T) or independant point (F) 86 / 87 !----------------------------------------------------------------------- 88 &namc1d_dyndmp ! U & V newtonian damping ("key_c1d" default: OFF) 82 &namc1d ! 1D configuration options (ln_c1d =T default: PAPA station) 83 !----------------------------------------------------------------------- 84 rn_lat1d = 30. ! Column latitude 85 rn_lon1d = 15. ! Column longitude 86 / 87 !----------------------------------------------------------------------- 88 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 89 89 !----------------------------------------------------------------------- 90 90 ln_dyndmp = .false. ! add a damping term (T) or not (F) 91 91 / 92 92 !----------------------------------------------------------------------- 93 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)93 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 94 94 !----------------------------------------------------------------------- 95 95 ! ! =T read U-V fields for: … … 118 118 !! namsbc_rnf river runoffs (ln_rnf =T) 119 119 !! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T) 120 !! namsbc_isf ice shelf melting/freezing (ln_isfcav =T : read (ln_read_cfg=T) or set or usr_def_zgr )121 !! namsbc_iscpl coupling option between land ice model and ocean (ln_isfcav =T)122 120 !! namsbc_wave external fields from wave model (ln_wave =T) 123 121 !! namberg iceberg floats (ln_icebergs=T) 122 !! namsbc_fwb freshwater-budget adjustment (nn_fwb > 0) 124 123 !!====================================================================== 125 124 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/MY_SRC/usrdef_nam.F90
r14021 r15574 39 39 CONTAINS 40 40 41 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)41 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 42 42 !!---------------------------------------------------------------------- 43 43 !! *** ROUTINE dom_nam *** … … 51 51 !! ** input : - namusr_def namelist found in namelist_cfg 52 52 !!---------------------------------------------------------------------- 53 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 56 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 53 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 56 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 57 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 58 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 57 59 ! 58 60 INTEGER :: ios ! Local integer … … 69 71 kk_cfg = 0 70 72 71 ! Global Domain size: C1D domain is 3 x 3grid-points x 75 or vertical levels72 kpi = 373 kpj = 374 kpk = 75 73 ! Global Domain size: C1D domain is 1 x 1 grid-points x 75 or vertical levels 74 kpi = 1 75 kpj = 1 76 kpk = 75 75 77 ! ! Set the lateral boundary condition of the global domain 76 kperio = 7 ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 78 ldIperio = .TRUE. ; ldJperio = .TRUE. ! C1D configuration : 1x1 basin with cyclic Est-West and Norht-South condition 79 ldNFold = .FALSE. ; cdNFtype = '-' 77 80 ! 78 81 ! ! control print … … 86 89 WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps 87 90 WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco 88 WRITE(numout,*) ' C1D domain = 3 x 3 x75 grid-points '91 WRITE(numout,*) ' C1D domain = 1 x 1 x 75 grid-points ' 89 92 WRITE(numout,*) ' resulting global domain size : jpiglo = ', kpi 90 93 WRITE(numout,*) ' jpjglo = ', kpj 91 94 WRITE(numout,*) ' jpkglo = ', kpk 92 WRITE(numout,*) ' Lateral boundary condition of the global domain' 93 WRITE(numout,*) ' C1D : closed basin jperio = ', kperio 95 WRITE(numout,*) ' ' 94 96 ENDIF 95 97 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/C1D_ASICS/cpp_C1D_ASICS.fcm
r14239 r15574 1 bld::tool::fppkeys key_ c1d key_qcokey_xios1 bld::tool::fppkeys key_linssh key_xios -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/EXPREF/file_def_nemo-oce.xml
r14224 r15574 15 15 <field field_ref="soce" /> 16 16 <field field_ref="ssh" /> 17 <field field_ref="s ocegrad" />17 <field field_ref="sssgrad" /> 18 18 <field field_ref="ke_int" /> 19 <field field_ref=" relvor" />20 <field field_ref=" potvor" />19 <field field_ref="ssrelvor" /> 20 <field field_ref="ssrelpotvor" /> 21 21 <field field_ref="saltc" /> 22 22 <field field_ref="salt2c" /> … … 26 26 <field field_ref="utau" /> 27 27 <field field_ref="uoce" /> 28 <field_group group_ref="trendU" />29 28 </file> 30 29 … … 32 31 <field field_ref="vtau" /> 33 32 <field field_ref="voce" /> 34 <field_group group_ref="trendV" />35 33 </file> 36 34 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 49 49 ln_sshnoise = .FALSE. ! add random noise on initial ssh 50 50 rn_lambda = 50. ! gaussian lambda 51 nn_perio = 1 51 ln_Iperio = .true. ! i-periodicity 52 ln_Jperio = .false. ! j-periodicity 52 53 / 53 54 !----------------------------------------------------------------------- … … 74 75 ln_write_cfg = .false. ! (=T) create the domain configuration file 75 76 cn_domcfg_out = "domain_cfg" ! newly created domain configuration filename 77 / 78 !----------------------------------------------------------------------- 79 &namtile ! parameters of the tiling 80 !----------------------------------------------------------------------- 76 81 / 77 82 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_hgr.F90
r14223 r15574 64 64 ! 65 65 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zphi0, zlam0, zbeta, zf0 66 INTEGER :: ii0, ij0 ! dummy loop indices 67 REAL(wp) :: zbeta, zf0 67 68 REAL(wp) :: zti, ztj ! local scalars 68 69 !!------------------------------------------------------------------------------- … … 77 78 ! Position coordinates (in kilometers) 78 79 ! ========== 79 zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx80 zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy80 ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 81 ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 81 82 82 83 #if defined key_agrif 83 84 ! ! let lower left longitude and latitude from parent 84 85 IF (.NOT.Agrif_root()) THEN 85 zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 86 &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 87 zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 88 &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 86 to be coded... 89 87 ENDIF 90 88 #endif 91 89 92 90 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 93 zti = REAL( mig0(ji) , wp ) - 0.5_wp ! start at i=0.5in the global grid without halos94 ztj = REAL( mjg0(jj) , wp ) - 0.5_wp ! start at j=0.5in the global grid without halos91 zti = REAL( mig0(ji)-ii0, wp ) ! =0 at i=ii0 in the global grid without halos 92 ztj = REAL( mjg0(jj)-ij0, wp ) ! =0 at i=ij0 in the global grid without halos 95 93 96 plamt(ji,jj) = zlam0 +rn_dx * zti97 plamu(ji,jj) = zlam0 +rn_dx * ( zti + 0.5_wp )94 plamt(ji,jj) = rn_dx * zti 95 plamu(ji,jj) = rn_dx * ( zti + 0.5_wp ) 98 96 plamv(ji,jj) = plamt(ji,jj) 99 97 plamf(ji,jj) = plamu(ji,jj) 100 98 101 pphit(ji,jj) = zphi0 +rn_dy * ztj102 pphiv(ji,jj) = zphi0 +rn_dy * ( ztj + 0.5_wp )99 pphit(ji,jj) = rn_dy * ztj 100 pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp ) 103 101 pphiu(ji,jj) = pphit(ji,jj) 104 102 pphif(ji,jj) = pphiv(ji,jj) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_istate.F90
r14224 r15574 239 239 ! 240 240 CALL lbc_lnk( 'usrdef_istate', pts , 'T', 1. ) 241 CALL lbc_lnk _multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. )241 CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 242 242 243 243 END SUBROUTINE usr_def_istate -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_nam.F90
r13472 r15574 50 50 LOGICAL , PUBLIC :: ln_sshnoise=.false. ! add random noise on initial ssh 51 51 REAL(wp), PUBLIC :: rn_lambda = 50. ! gaussian lambda 52 INTEGER , PUBLIC :: nn_perio = 0 ! periodicity of the channel (0=closed, 1=E-W)53 52 54 53 !!---------------------------------------------------------------------- … … 59 58 CONTAINS 60 59 61 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)60 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 62 61 !!---------------------------------------------------------------------- 63 62 !! *** ROUTINE dom_nam *** … … 71 70 !! ** input : - namusr_def namelist found in namelist_cfg 72 71 !!---------------------------------------------------------------------- 73 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 74 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 75 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 76 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 72 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 73 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 74 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 75 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 76 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 77 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 77 78 ! 78 79 INTEGER :: ios ! Local integer 79 80 REAL(wp):: zh ! Local scalars 81 LOGICAL :: ln_Iperio, ln_Jperio 80 82 !! 81 83 NAMELIST/namusr_def/ rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio & 82 84 & , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac & 83 85 & , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy & 84 & , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio86 & , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, ln_Iperio, ln_Jperio 85 87 !!---------------------------------------------------------------------- 86 88 ! … … 102 104 #endif 103 105 ! 104 IF(lwm) WRITE( numond, namusr_def )105 !106 106 cd_cfg = 'EW_CANAL' ! name & resolution (not used) 107 107 kk_cfg = INT( rn_dx ) … … 109 109 IF( Agrif_Root() ) THEN ! Global Domain size: EW_CANAL global domain is 1800 km x 1800 Km x 5000 m 110 110 kpi = NINT( rn_domszx / rn_dx ) + 1 111 kpj = NINT( rn_domszy / rn_dy ) + 3111 kpj = NINT( rn_domszy / rn_dy ) + 1 112 112 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 113 kpi = nbcellsx + nbghostcells_x + nbghostcells_x+ 2113 kpi = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 114 114 kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 115 115 ENDIF … … 117 117 ! 118 118 zh = (kpk-1)*rn_dz 119 ! ! Set the lateral boundary condition of the global domain120 kperio = 1 ! EW_CANAL configuration : closed basin121 119 ! ! control print 122 120 IF(lwp) THEN … … 149 147 WRITE(numout,*) ' add random noise on initial ssh ln_sshnoise= ', ln_sshnoise 150 148 WRITE(numout,*) ' Gaussian lambda parameter rn_lambda = ', rn_lambda 151 WRITE(numout,*) ' Periodicity of the basin nn_perio = ', nn_perio 149 WRITE(numout,*) ' i and j Periodicity ln_Iperio, ln_Jperio = ', ln_Iperio, ln_Jperio 150 WRITE(numout,*) ' ' 152 151 ENDIF 153 152 ! ! Set the lateral boundary condition of the global domain 154 kperio = nn_perio ! EW_CANAL configuration : closed basin 153 ldIperio = ln_Iperio ; ldJperio = ln_Jperio ! CANAL configuration 154 ldNFold = .FALSE. ; cdNFtype = '-' 155 155 ! 156 156 END SUBROUTINE usr_def_nam -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CANAL/MY_SRC/usrdef_zgr.F90
r13472 r15574 202 202 END SELECT 203 203 ! 204 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero ( here jperio=0 ==>> closed)204 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (closed boundaries) 205 205 ! 206 206 k_bot(:,:) = NINT( z2d(:,:) ) ! =jpkm1 over the ocean point, =0 elsewhere -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/CPL_OASIS/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 38 38 ln_closea = .false. ! F => suppress closed seas (defined by closea_mask field) 39 39 ! ! from the bathymetry at runtime. 40 / 41 !----------------------------------------------------------------------- 42 &namtile ! parameters of the tiling 43 !----------------------------------------------------------------------- 40 44 / 41 45 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/1_namelist_cfg
r14254 r15574 7 7 &namagrif ! AGRIF zoom ("key_agrif") 8 8 !----------------------------------------------------------------------- 9 ln_agrif_2way = .true. ! activate two way nesting10 ln_init_chfrpar = .false.! initialize child grids from parent11 9 ln_vert_remap = .true. ! use vertical remapping 12 ln_chk_bathy = .true. ! =T check the parent bathymetry13 ln_spc_dyn = .false.14 rn_sponge_tra = 0.0 ! coefficient for tracer sponge layer []15 rn_sponge_dyn = 0.002 ! coefficient for dynamics sponge layer []16 rn_trelax_tra = 0.01 ! inverse of relaxation time (in steps) for tracers []17 rn_trelax_dyn = 0.01 ! inverse of relaxation time (in steps) for dynamics []18 10 / 19 11 !----------------------------------------------------------------------- … … 44 36 / 45 37 !----------------------------------------------------------------------- 38 &namtile ! parameters of the tiling 39 !----------------------------------------------------------------------- 40 / 41 !----------------------------------------------------------------------- 46 42 &namdom ! space and time domain (bathymetry, mesh, timestep) 47 43 !----------------------------------------------------------------------- 48 ln_linssh = . true.44 ln_linssh = .false. 49 45 rn_Dt = 150. ! time step for the dynamics (and tracer if nn_acc=0) 50 46 rn_atfp = 0.1 ! asselin time filter parameter -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/AGRIF_FixedGrids.in
r14216 r15574 1 1 1 2 2 78 358 88 1622 2 22 281 361 121 169 2 2 2 3 3 0 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/EXPREF/namelist_cfg
r14254 r15574 32 32 / 33 33 !----------------------------------------------------------------------- 34 &namtile ! parameters of the tiling 35 !----------------------------------------------------------------------- 36 / 37 !----------------------------------------------------------------------- 34 38 &namdom ! space and time domain (bathymetry, mesh, timestep) 35 39 !----------------------------------------------------------------------- 36 ln_linssh = . true.40 ln_linssh = .false. 37 41 rn_Dt = 300. ! time step for the dynamics (and tracer if nn_acc=0) 38 42 rn_atfp = 0.1 ! asselin time filter parameter -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_hgr.F90
r14254 r15574 23 23 IMPLICIT NONE 24 24 PRIVATE 25 26 REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 25 27 26 28 PUBLIC usr_def_hgr ! called by domhgr.F90 … … 64 66 ! 65 67 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zphi0, zlam067 68 REAL(wp) :: zti, ztj ! local scalars 68 69 !!------------------------------------------------------------------------------- … … 77 78 ! Position coordinates (in kilometers) 78 79 ! ========== 79 zlam0 = -REAL( 0.5 + 1700._wp * 1.e3 / rn_dx) 80 zphi0 = -REAL( 0.5 + 800._wp * 1.e3 / rn_dy) 80 ! Offsets in km of the first south west f-point: 81 roffsetx = -1700._wp 82 roffsety = -800._wp 81 83 #if defined key_agrif 82 IF( .NOT.Agrif_Root() ) THEN 83 zlam0 = - REAL( 0.5 + 1700._wp * 1.e3 / rn_dx + nbghostcells) & 84 & + REAL((nbghostcells + Agrif_Ix() - 1)*Agrif_irhox()) 85 zphi0 = - REAL( 0.5 + 800._wp * 1.e3 / rn_dy + nbghostcells) & 86 & + REAL((nbghostcells + Agrif_Iy() - 1)*Agrif_irhoy()) 87 ENDIF 84 IF( .NOT.Agrif_Root() ) THEN 85 ! deduce offset from parent: 86 roffsetx = Agrif_Parent(roffsetx) & 87 & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 88 & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 89 roffsety = Agrif_Parent(roffsety) & 90 & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 91 & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 92 ENDIF 88 93 #endif 89 94 90 DO_2D( 1, 1, 1, 1)91 zti = REAL( mig0 _oldcmp(ji) - 1, wp ) ! start at i=0 in the global grid without halos92 ztj = REAL( mjg0 _oldcmp(jj) - 1, wp ) ! start at j=0 in the global grid without halos95 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 96 zti = REAL( mig0(ji) - 1, wp ) ! start at i=0 in the global grid without halos 97 ztj = REAL( mjg0(jj) - 1, wp ) ! start at j=0 in the global grid without halos 93 98 94 plamt(ji,jj) = r n_dx * 1.e-3 * ( zlam0 + zti)95 plamu(ji,jj) = r n_dx * 1.e-3 * ( zlam0 + zti + 0.5_wp )99 plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 100 plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 * zti 96 101 plamv(ji,jj) = plamt(ji,jj) 97 102 plamf(ji,jj) = plamu(ji,jj) 98 103 99 pphit(ji,jj) = r n_dy * 1.e-3 * ( zphi0 + ztj)100 pphiv(ji,jj) = r n_dy * 1.e-3 * ( zphi0 + ztj + 0.5_wp )104 pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 105 pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 * ztj 101 106 pphiu(ji,jj) = pphit(ji,jj) 102 107 pphif(ji,jj) = pphiv(ji,jj) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_istate.F90
r14254 r15574 103 103 pts(ji,jj,jk,jp_tem) = (15._wp - zrho1) * ptmask(ji,jj,jk) 104 104 ! Mass conserving initialization: 105 ztd = 15._wp*gdepw_0(ji,jj,jk+1)-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk+1)**2106 ztu = 15._wp*gdepw_0(ji,jj,jk )-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk )**2107 pts(ji,jj,jk,jp_tem) = (ztd - ztu)/e3t_0(ji,jj,jk) * ptmask(ji,jj,jk)105 ! ztd = 15._wp*gdepw_0(ji,jj,jk+1)-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk+1)**2 106 ! ztu = 15._wp*gdepw_0(ji,jj,jk )-0.5*rho0*zn2/(rn_a0*grav)*gdepw_0(ji,jj,jk )**2 107 ! pts(ji,jj,jk,jp_tem) = (ztd - ztu)/e3t_0(ji,jj,jk) * ptmask(ji,jj,jk) 108 108 IF (Agrif_root().AND.( mjg0(jj) == Nj0glo-2 ) ) THEN 109 109 pv(ji,jj,jk) = -sqrt(zdb*zh0)*exp(-zxw/zro)*(1._wp-zf) * ptmask(ji,jj,jk) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_nam.F90
r14254 r15574 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 54 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 58 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 59 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 58 60 ! 59 61 INTEGER :: ios ! Local integer 62 INTEGER :: ighost_w, ighost_e, ighost_s, ighost_n 60 63 REAL(wp):: zlx, zly, zh ! Local scalars 61 64 !! … … 72 75 rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 73 76 rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 74 rn_dz = Agrif_Parent(rn_dz)75 77 rn_f0 = Agrif_Parent(rn_f0) 76 78 ENDIF … … 82 84 kk_cfg = nINT( rn_dx ) 83 85 ! 86 #if defined key_agrif 84 87 IF( Agrif_Root() ) THEN ! Global Domain size: DOME global domain is 2000 km x 850 Km x 3600 m 88 #endif 85 89 kpi = NINT( 2000.e3 / rn_dx ) + 2 86 90 kpj = NINT( 850.e3 / rn_dy ) + 2 + 1 91 #if defined key_agrif 87 92 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 88 kpi = nbcellsx + 2 * ( nbghostcells + 1 ) 89 kpj = nbcellsy + 2 * ( nbghostcells + 1 ) 90 !!$ kpi = nbcellsx + nbghostcells_x + nbghostcells_x + 2 91 !!$ kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 93 ! At this stage, child ghosts have not been set 94 ighost_w = nbghostcells 95 ighost_e = nbghostcells 96 ighost_s = nbghostcells 97 ighost_n = nbghostcells 98 ! In case one sets zoom boundaries over domain edges: 99 IF ( Agrif_Ix() == 2 - Agrif_Parent(nbghostcells_x_w) ) ighost_w = 1 100 IF ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)-Agrif_Parent(nbghostcells_x_w) ) ighost_e = 1 101 IF ( Agrif_Iy() == 2 - Agrif_Parent(nbghostcells_y_s) ) ighost_s = 1 102 IF ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)-Agrif_Parent(nbghostcells_y_s) ) ighost_n = 1 103 kpi = nbcellsx + ighost_w + ighost_e 104 kpj = nbcellsy + ighost_s + ighost_n 105 !! JC: number of ghosts are unknown at this stage ! 106 !!$ kpi = nbcellsx + nbghostcells_x_w + nbghostcells_x_e 107 !!$ kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n 92 108 ENDIF 109 #endif 93 110 kpk = NINT( 3600._wp / rn_dz ) + 1 94 111 ! … … 97 114 zh = (kpk-1)*rn_dz 98 115 ! ! Set the lateral boundary condition of the global domain 99 kperio = 0 ! DOME configuration : closed basin 116 ldIperio = .FALSE. ; ldJperio = .FALSE. ! DOME configuration : closed domain 117 ldNFold = .FALSE. ; cdNFtype = '-' 118 ! 100 119 ! ! control print 101 120 IF(lwp) THEN … … 118 137 WRITE(numout,*) ' Coriolis frequency rn_f0 = ', rn_f0, ' s-1' 119 138 WRITE(numout,*) ' ' 120 WRITE(numout,*) ' Lateral boundary condition of the global domain'121 WRITE(numout,*) ' DOME : closed basin jperio = ', kperio122 139 ENDIF 123 140 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/MY_SRC/usrdef_zgr.F90
r14261 r15574 86 86 ! at u/v/f-point: averaging zht 87 87 zhu(:,:) = 600_wp ; zhv(:,:) = 600_wp ; zhf(:,:) = 600_wp 88 DO ji = 1, jpim1 89 zhu(ji,:) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) ) 90 END DO 91 DO jj = 1, jpjm1 92 zhv(:,jj) = 0.5_wp * ( zht(:,jj) + zht(:,jj+1) ) 93 END DO 94 DO jj = 1, jpjm1 95 DO ji = 1, jpim1 96 zhf(ji,jj) = 0.25_wp * ( zht(ji,jj ) + zht(ji+1,jj ) & 97 & + zht(ji,jj+1) + zht(ji+1,jj+1) ) 98 END DO 99 END DO 100 CALL lbc_lnk_multi( 'usrdef_zgr', zhu, 'U', 1.0_wp, zhv, 'V', 1.0_wp, zhf, 'F', 1.0_wp) 88 DO_2D( 0, 0, 0, 0 ) 89 zhu(ji,jj) = 0.5_wp * ( zht(ji,jj ) + zht(ji+1,jj ) ) 90 zhv(jj,jj) = 0.5_wp * ( zht(ji,jj ) + zht(ji ,jj+1) ) 91 zhf(ji,jj) = 0.25_wp * ( zht(ji,jj ) + zht(ji+1,jj ) & 92 & + zht(ji,jj+1) + zht(ji+1,jj+1) ) 93 END_2D 94 CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1.0_wp, zhv, 'V', 1.0_wp, zhf, 'F', 1.0_wp) 101 95 ! 102 96 CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d ) ! Reference z-coordinate system … … 106 100 ! 107 101 ! no ocean cavities : top ocean level is ONE, except over land 108 ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0102 ! the ocean basin surrounded by land (1+nn_hls grid-point) set through lbc_lnk call 109 103 z2d(:,:) = 1._wp ! surface ocean is the 1st level 110 104 WHERE (gphit(:,:)>0._wp) z2d(:,:) = 0._wp 111 105 ! Dig inlet: 112 106 WHERE ((gphit(:,:)>0._wp).AND.(glamt(:,:)>-50._wp).AND.(glamt(:,:)<50._wp)) z2d(:,:) = 1._wp 113 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin since jperio = 0 (see userdef_nam.F90)107 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin, see userdef_nam.F90 114 108 k_top(:,:) = NINT( z2d(:,:) ) 115 109 ! … … 193 187 pe3w (ji,jj,ik ) = pdept(ji,jj,ik ) - pdept(ji,jj,ik-1) ! st caution ik > 1 194 188 END_2D 195 ! ! bottom scale factors and depth at U-, V-, UW and VW-points 196 ! ! usually Computed as the minimum of neighbooring scale factors 197 pe3u (:,:,:) = pe3t(:,:,:) ! HERE DOME configuration : 198 pe3v (:,:,:) = pe3t(:,:,:) ! e3 increases with i-index and identical with j-index 199 pe3f (:,:,:) = pe3t(:,:,:) ! so e3 minimum of (i,i+1) points is (i) point 200 pe3uw(:,:,:) = pe3w(:,:,:) ! in j-direction e3v=e3t and e3f=e3v 201 pe3vw(:,:,:) = pe3w(:,:,:) ! ==>> no need of lbc_lnk calls 189 ! 190 DO_3D( 0, 0, 0, 0, 1, jpk ) 191 pe3u (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji+1,jj,jk) ) 192 pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) ) 193 pe3uw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji+1,jj,jk) ) 194 pe3vw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji,jj+1,jk) ) 195 END_3D 196 ! 197 CALL lbc_lnk('usrdef_zgr', pe3u , 'U', 1._wp, pe3uw, 'U', 1._wp ) 198 CALL lbc_lnk('usrdef_zgr', pe3v , 'V', 1._wp, pe3vw, 'V', 1._wp ) 199 ! 200 DO jk = 1, jpk 201 WHERE( pe3u (:,:,jk) == 0._wp ) pe3u (:,:,jk) = pe3t_1d(jk) 202 WHERE( pe3v (:,:,jk) == 0._wp ) pe3v (:,:,jk) = pe3t_1d(jk) 203 WHERE( pe3uw(:,:,jk) == 0._wp ) pe3uw(:,:,jk) = pe3w_1d(jk) 204 WHERE( pe3vw(:,:,jk) == 0._wp ) pe3vw(:,:,jk) = pe3w_1d(jk) 205 END DO 206 207 DO_3D( 0, 0, 0, 0, 1, jpk ) 208 pe3f(ji,jj,jk) = MIN( pe3v(ji,jj,jk), pe3v(ji+1,jj,jk) ) 209 END_3D 210 CALL lbc_lnk('usrdef_zgr', pe3f, 'F', 1._wp ) 202 211 ! 203 212 ENDIF -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DOME/cpp_DOME.fcm
r14239 r15574 1 bld::tool::fppkeys key_xios key_agrif key_linssh1 bld::tool::fppkeys key_xios key_agrif -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/DONUT/EXPREF/namelist_cfg
r14226 r15574 27 27 ! ! (=F) user defined configuration (F => create/check namusr_def) 28 28 cn_domcfg = "donut_cfg" ! domain configuration filename 29 / 30 !----------------------------------------------------------------------- 31 &namtile ! parameters of the tiling 32 !----------------------------------------------------------------------- 29 33 / 30 34 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICB/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 55 / 56 !----------------------------------------------------------------------- 53 57 &namtsd ! Temperature & Salinity Data (init/dmp) (default: OFF) 54 58 !----------------------------------------------------------------------- … … 64 68 / 65 69 !----------------------------------------------------------------------- 66 &namc1d ! 1D configuration options ( "key_c1d"default: PAPA station)67 !----------------------------------------------------------------------- 68 / 69 !----------------------------------------------------------------------- 70 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)71 !----------------------------------------------------------------------- 72 / 73 !----------------------------------------------------------------------- 74 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)70 &namc1d ! 1D configuration options (ln_c1d =T default: PAPA station) 71 !----------------------------------------------------------------------- 72 / 73 !----------------------------------------------------------------------- 74 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 75 !----------------------------------------------------------------------- 76 / 77 !----------------------------------------------------------------------- 78 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 75 79 !----------------------------------------------------------------------- 76 80 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICB/MY_SRC/usrdef_nam.F90
r13899 r15574 42 42 CONTAINS 43 43 44 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)44 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 45 45 !!---------------------------------------------------------------------- 46 46 !! *** ROUTINE dom_nam *** … … 54 54 !! ** input : - namusr_def namelist found in namelist_cfg 55 55 !!---------------------------------------------------------------------- 56 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 57 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 58 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 59 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 56 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 57 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 58 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 59 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 60 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 61 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 60 62 ! 61 63 INTEGER :: ios ! Local integer … … 78 80 ! 79 81 ! ! Set the lateral boundary condition of the global domain 80 kperio = 0 ! ICB configuration : box 82 ldIperio = .FALSE. ; ldJperio = .FALSE. ! ICB configuration : closed domain 83 ldNFold = .FALSE. ; cdNFtype = '-' 81 84 ! 82 85 ! ! control print … … 99 102 WRITE(numout,*) ' jpkglo = ', kpk 100 103 WRITE(numout,*) ' ' 101 WRITE(numout,*) ' Lateral boundary condition of the global domain'102 WRITE(numout,*) ' ICB : closed basin jperio = ', kperio103 104 ENDIF 104 105 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 49 49 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 50 50 cn_domcfg = "ICE_ADV1D_domcfg" ! domain configuration filename 51 / 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 51 55 / 52 56 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_120pts
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_240pts
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/EXPREF/namelist_cfg_60pts
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90
r13286 r15574 39 39 CONTAINS 40 40 41 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)41 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 42 42 !!---------------------------------------------------------------------- 43 43 !! *** ROUTINE dom_nam *** … … 51 51 !! ** input : - namusr_def namelist found in namelist_cfg 52 52 !!---------------------------------------------------------------------- 53 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 56 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 53 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 55 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 56 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 57 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 58 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 57 59 ! 58 60 INTEGER :: ios ! Local integer … … 78 80 zly = kpj*rn_dy*1.e-3 79 81 ! ! Set the lateral boundary condition of the global domain 80 kperio = 0 ! ICE_ADV1D configuration : bi-periodic basin 82 ldIperio = .FALSE. ; ldJperio = .FALSE. ! ICE_ADV1D configuration : closed domain 83 ldNFold = .FALSE. ; cdNFtype = '-' 84 ! 81 85 ! ! control print 82 86 IF(lwp) THEN … … 95 99 WRITE(numout,*) ' Coriolis:', ln_corio 96 100 WRITE(numout,*) ' ' 97 WRITE(numout,*) ' Lateral boundary condition of the global domain'98 WRITE(numout,*) ' ICE_ADV1D : closed basin jperio = ', kperio99 101 ENDIF 100 102 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV2D/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 49 49 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 50 50 cn_domcfg = "ICE_ADV2D_domcfg" ! domain configuration filename 51 / 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 51 55 / 52 56 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90
r13286 r15574 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 54 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 58 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 59 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 58 60 ! 59 61 INTEGER :: ios ! Local integer … … 86 88 kpj = NINT( 300.e3 / rn_dy ) - 1 87 89 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 88 kpi = nbcellsx + nbghostcells_x + nbghostcells_x+ 290 kpi = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 89 91 kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 90 92 ENDIF … … 96 98 zly = kpj*rn_dy*1.e-3 97 99 ! 98 IF( Agrif_Root() ) THEN ; kperio = 7 ! ICE_AGRIFconfiguration : bi-periodic basin99 ELSE ; kperio = 0! closed periodicity for the zoom100 IF( Agrif_Root() ) THEN ; ldIperio = .TRUE. ; ldJperio = .TRUE. ! ICE_ADV2D configuration : bi-periodic basin 101 ELSE ; ldIperio = .FALSE. ; ldJperio = .FALSE. ! closed periodicity for the zoom 100 102 ENDIF 103 ldNFold = .FALSE. ; cdNFtype = '-' 104 ! 101 105 ! ! control print 102 106 IF(lwp) THEN … … 115 119 WRITE(numout,*) ' Coriolis:', ln_corio 116 120 WRITE(numout,*) ' ' 117 WRITE(numout,*) ' Lateral boundary condition of the global domain'118 WRITE(numout,*) ' ICE_ADV2D : bi-periodic basin jperio = ', kperio119 121 ENDIF 120 122 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/1_namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 49 49 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 50 50 cn_domcfg = "ICE_AGRIF_domcfg" ! domain configuration filename 51 / 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 51 55 / 52 56 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in
r13286 r15574 1 1 1 2 3 3 62 33 623 3 32 34 63 34 63 3 3 3 3 3 0 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/make_INITICE.py
r10516 r15574 20 20 # Reading coordinates file 21 21 nccoord=netcdf(fcoord,'r') 22 nav_lon=nccoord.variables[' nav_lon']23 nav_lat=nccoord.variables[' nav_lat']22 nav_lon=nccoord.variables['x'] 23 nav_lat=nccoord.variables['y'] 24 24 time_counter=1 25 25 LON1= nav_lon.shape[1] -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 49 49 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 50 50 cn_domcfg = "ICE_AGRIF_domcfg" ! domain configuration filename 51 / 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 51 55 / 52 56 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90
r14223 r15574 23 23 IMPLICIT NONE 24 24 PRIVATE 25 26 REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 25 27 26 28 PUBLIC usr_def_hgr ! called by domhgr.F90 … … 50 52 !! without Coriolis force (f=0) 51 53 !! 52 !! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees)54 !! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in kms) 53 55 !! - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) 54 56 !! - define i- & j-scale factors at t-, u-, v- and f-points (in meters) … … 65 67 ! 66 68 INTEGER :: ji, jj ! dummy loop indices 67 REAL(wp) :: z phi0, zlam0, zbeta, zf069 REAL(wp) :: zbeta, zf0 68 70 REAL(wp) :: zti, ztj ! local scalars 69 71 !!------------------------------------------------------------------------------- … … 74 76 IF(lwp) WRITE(numout,*) ' f-plane with irregular grid-spacing (+- 10%)' 75 77 IF(lwp) WRITE(numout,*) ' the max is given by rn_dx and rn_dy' 78 ! 79 ! 80 ! Position coordinates (in kilometers) 81 ! ========== 82 ! Offset is given at first f-point, i.e. at (i,j) = (nn_hls+1, nn_hls+1) 83 ! Here we assume the grid is centred around a T-point at the middle of 84 ! of the domain (hence domain size is odd) 85 roffsetx = (-REAL(Ni0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dx 86 roffsety = (-REAL(Nj0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dy 87 #if defined key_agrif 88 IF( .NOT.Agrif_Root() ) THEN 89 ! deduce offset from parent: 90 roffsetx = Agrif_Parent(roffsetx) & 91 & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 92 & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 93 roffsety = Agrif_Parent(roffsety) & 94 & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 95 & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 96 ENDIF 97 #endif 98 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 99 zti = REAL( mig0(ji)-1, wp ) ! start at i=0 in the global grid without halos 100 ztj = REAL( mjg0(jj)-1, wp ) ! start at j=0 in the global grid without halos 76 101 77 ! ========== 78 #if defined key_agrif 79 IF( Agrif_Root() ) THEN 80 #endif 81 zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 82 zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 83 #if defined key_agrif 84 ELSE 85 ! ! let lower left longitude and latitude from parent 86 !clem zlam0 = Agrif_Parent(zlam0) + (Agrif_ix())*Agrif_Parent(rn_dx) * 1.e-5 87 !clem zphi0 = Agrif_Parent(zphi0) + (Agrif_iy())*Agrif_Parent(rn_dy) * 1.e-5 88 zlam0 = ( 0.5_wp - REAL(Ni0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx & 89 & + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 90 zphi0 = ( 0.5_wp - REAL(Nj0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy & 91 & + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 92 ENDIF 93 #endif 102 plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 103 plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 * zti 104 plamv(ji,jj) = plamt(ji,jj) 105 plamf(ji,jj) = plamu(ji,jj) 94 106 95 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 96 zti = REAL( mig0(ji), wp ) - 0.5_wp ! start at i=0.5 in the global grid without halos 97 ztj = REAL( mjg0(jj), wp ) - 0.5_wp ! start at j=0.5 in the global grid without halos 98 99 plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 100 plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 101 plamv(ji,jj) = plamt(ji,jj) 102 plamf(ji,jj) = plamu(ji,jj) 103 104 pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj 105 pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp ) 106 pphiu(ji,jj) = pphit(ji,jj) 107 pphif(ji,jj) = pphiv(ji,jj) 107 pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 108 pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 * ztj 109 pphiu(ji,jj) = pphit(ji,jj) 110 pphif(ji,jj) = pphiv(ji,jj) 108 111 END_2D 109 110 111 112 ! 113 ! Horizontal scale factors (in meters) 114 ! ====== 112 115 !! ==> EITHER 1) variable scale factors 113 116 !! clem: This can be used with a 1proc simulation but I think it breaks repro when >1procs are used -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90
r14223 r15574 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 54 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 58 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 59 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 58 60 ! 59 61 INTEGER :: ios ! Local integer … … 86 88 kpj = NINT( 300.e3 / rn_dy ) - 3 87 89 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 88 kpi = nbcellsx + 2 * ( nbghostcells + 1 ) 89 kpj = nbcellsy + 2 * ( nbghostcells + 1 ) 90 !!$ kpi = nbcellsx + nbghostcells_x + nbghostcells_x + 2 90 kpi = nbcellsx + 2 * nbghostcells 91 kpj = nbcellsy + 2 * nbghostcells 92 !! JC: number of ghosts unknown at this tage 93 !!$ kpi = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 91 94 !!$ kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 92 95 ENDIF … … 98 101 zly = kpj*rn_dy*1.e-3 99 102 ! 100 IF( Agrif_Root() ) THEN ; kperio = 7! ICE_AGRIF configuration : bi-periodic basin101 ELSE ; kperio = 0! closed periodicity for the zoom103 IF( Agrif_Root() ) THEN ; ldIperio = .TRUE. ; ldJperio = .TRUE. ! ICE_AGRIF configuration : bi-periodic basin 104 ELSE ; ldIperio = .FALSE. ; ldJperio = .FALSE. ! closed periodicity for the zoom 102 105 ENDIF 106 ldNFold = .FALSE. ; cdNFtype = '-' 107 ! 103 108 ! ! control print 104 109 IF(lwp) THEN … … 117 122 WRITE(numout,*) ' Coriolis:', ln_corio 118 123 WRITE(numout,*) ' ' 119 WRITE(numout,*) ' Lateral boundary condition of the global domain'120 WRITE(numout,*) ' ICE_AGRIF : bi-periodic basin jperio = ', kperio121 124 ENDIF 122 125 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 48 48 ln_read_cfg = .false. ! (=T) read the domain configuration file 49 49 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 50 / 51 !----------------------------------------------------------------------- 52 &namtile ! parameters of the tiling 53 !----------------------------------------------------------------------- 50 54 / 51 55 !!====================================================================== -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/icedyn_rhg_eap.F90
r14120 r15574 58 58 59 59 REAL(wp), DIMENSION(nx_yield, ny_yield, na_yield) :: s11r, s12r, s22r, s11s, s12s, s22s 60 61 !! * Substitutions 62 # include "do_loop_substitute.h90" 63 # include "domzgr_substitute.h90" 60 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: fimask ! mask at F points for the ice 64 61 65 62 !! for convergence tests 66 63 INTEGER :: ncvgid ! netcdf file id 67 64 INTEGER :: nvarid ! netcdf variable id 68 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: aimsk00 69 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: eap_res , aimsk15 65 66 !! * Substitutions 67 # include "do_loop_substitute.h90" 70 68 !!---------------------------------------------------------------------- 71 69 !! NEMO/ICE 4.0 , NEMO Consortium (2018) … … 182 180 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_base, ztauy_base ! ice-bottom stress at U-V points (landfast) 183 181 ! 182 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00, zmsk15 184 183 REAL(wp), DIMENSION(jpi,jpj) :: zmsk01x, zmsk01y ! dummy arrays 185 184 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00x, zmsk00y ! mask for ice presence 186 REAL(wp), DIMENSION(jpi,jpj) :: zfmask ! mask at F points for the ice187 185 188 186 REAL(wp), PARAMETER :: zepsi = 1.0e-20_wp ! tolerance parameter … … 205 203 IF( kt == nit000 .AND. lwp ) WRITE(numout,*) '-- ice_dyn_rhg_eap: EAP sea-ice rheology' 206 204 ! 207 IF( kt == nit000 ) THEN 208 ! 209 ! for diagnostics 210 ALLOCATE( aimsk00(jpi,jpj) ) 211 ! for convergence tests 212 IF( nn_rhg_chkcvg > 0 ) ALLOCATE( eap_res(jpi,jpj), aimsk15(jpi,jpj) ) 213 ENDIF 214 ! 205 ! for diagnostics and convergence tests 215 206 DO_2D( 1, 1, 1, 1 ) 216 aimsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice , 0 if no ice207 zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice , 0 if no ice 217 208 END_2D 218 209 IF( nn_rhg_chkcvg > 0 ) THEN 219 210 DO_2D( 1, 1, 1, 1 ) 220 aimsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less211 zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 221 212 END_2D 222 213 ENDIF 223 214 ! 224 !!gm for Clem: OPTIMIZATION: I think zfmask can be computed one for all at the initialization....225 215 !------------------------------------------------------------------------------! 226 216 ! 0) mask at F points for the ice 227 217 !------------------------------------------------------------------------------! 228 ! ocean/land mask 229 DO_2D( 1, 0, 1, 0 ) 230 zfmask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 231 END_2D 232 CALL lbc_lnk( 'icedyn_rhg_eap', zfmask, 'F', 1._wp ) 233 234 ! Lateral boundary conditions on velocity (modify zfmask) 235 DO_2D( 0, 0, 0, 0 ) 236 IF( zfmask(ji,jj) == 0._wp ) THEN 237 zfmask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 238 & vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 218 IF( kt == nit000 ) THEN 219 ! ocean/land mask 220 ALLOCATE( fimask(jpi,jpj) ) 221 IF( rn_ishlat == 0._wp ) THEN 222 DO_2D( 0, 0, 0, 0 ) 223 fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 224 END_2D 225 ELSE 226 DO_2D( 0, 0, 0, 0 ) 227 fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 228 ! Lateral boundary conditions on velocity (modify fimask) 229 IF( fimask(ji,jj) == 0._wp ) THEN 230 fimask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 231 & vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 232 ENDIF 233 END_2D 239 234 ENDIF 240 END_2D 241 DO jj = 2, jpjm1 242 IF( zfmask(1,jj) == 0._wp ) THEN 243 zfmask(1 ,jj) = rn_ishlat * MIN( 1._wp , MAX( vmask(2,jj,1), umask(1,jj+1,1), umask(1,jj,1) ) ) 244 ENDIF 245 IF( zfmask(jpi,jj) == 0._wp ) THEN 246 zfmask(jpi,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(jpi,jj+1,1), vmask(jpim1,jj,1), umask(jpi,jj-1,1) ) ) 247 ENDIF 248 END DO 249 DO ji = 2, jpim1 250 IF( zfmask(ji,1) == 0._wp ) THEN 251 zfmask(ji, 1 ) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,1,1), umask(ji,2,1), vmask(ji,1,1) ) ) 252 ENDIF 253 IF( zfmask(ji,jpj) == 0._wp ) THEN 254 zfmask(ji,jpj) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,jpj,1), vmask(ji-1,jpj,1), umask(ji,jpjm1,1) ) ) 255 ENDIF 256 END DO 257 CALL lbc_lnk( 'icedyn_rhg_eap', zfmask, 'F', 1.0_wp ) 235 CALL lbc_lnk( 'icedyn_rhg_eap', fimask, 'F', 1.0_wp ) 236 ENDIF 258 237 259 238 !------------------------------------------------------------------------------! … … 354 333 355 334 END_2D 356 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp )335 CALL lbc_lnk( 'icedyn_rhg_eap', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 357 336 ! 358 337 ! !== Landfast ice parameterization ==! … … 405 384 zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj) & 406 385 & + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj) & 407 & ) * r1_e1e2f(ji,jj) * zfmask(ji,jj)386 & ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 408 387 409 388 END_2D … … 492 471 zs2(ji,jj) = ( zs2(ji,jj) * zalph1 + zstressmtmp ) * z1_alph1 493 472 END_2D 494 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zstress12tmp, 'T', 1.0_wp , paniso_11, 'T', 1.0_wp , paniso_12, 'T', 1.0_wp)473 CALL lbc_lnk( 'icedyn_rhg_eap', zstress12tmp, 'T', 1.0_wp , paniso_11, 'T', 1.0_wp , paniso_12, 'T', 1.0_wp) 495 474 496 475 ! Save beta at T-points for further computations … … 520 499 521 500 END_2D 522 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zs1, 'T', 1.0_wp, zs2, 'T', 1.0_wp, zs12, 'F', 1.0_wp )501 CALL lbc_lnk( 'icedyn_rhg_eap', zs1, 'T', 1.0_wp, zs2, 'T', 1.0_wp, zs12, 'F', 1.0_wp ) 523 502 524 503 ! --- Ice internal stresses (Appendix C of Hunke and Dukowicz, 2002) --- ! … … 782 761 783 762 ! convergence test 784 IF( nn_rhg_chkcvg == 2 ) CALL rhg_cvg_eap( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice )763 IF( nn_rhg_chkcvg == 2 ) CALL rhg_cvg_eap( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice, zmsk15 ) 785 764 ! 786 765 ! ! ==================== ! … … 799 778 zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj) & 800 779 & + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj) & 801 & ) * r1_e1e2f(ji,jj) * zfmask(ji,jj)780 & ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 802 781 803 782 END_2D … … 832 811 833 812 END_2D 834 CALL lbc_lnk _multi( 'icedyn_rhg_eap', pshear_i, 'T', 1.0_wp, pdivu_i, 'T', 1.0_wp, pdelta_i, 'T', 1.0_wp, &835 & 836 & 813 CALL lbc_lnk( 'icedyn_rhg_eap', pshear_i, 'T', 1.0_wp, pdivu_i, 'T', 1.0_wp, pdelta_i, 'T', 1.0_wp, & 814 & zten_i, 'T', 1.0_wp, zs1 , 'T', 1.0_wp, zs2 , 'T', 1.0_wp, & 815 & zs12, 'F', 1.0_wp ) 837 816 838 817 ! --- Store the stress tensor for the next time step --- ! … … 849 828 & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 850 829 ! 851 CALL lbc_lnk _multi( 'icedyn_rhg_eap', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, &852 & 853 ! 854 CALL iom_put( 'utau_oi' , ztaux_oi * aimsk00 )855 CALL iom_put( 'vtau_oi' , ztauy_oi * aimsk00 )856 CALL iom_put( 'utau_ai' , ztaux_ai * aimsk00 )857 CALL iom_put( 'vtau_ai' , ztauy_ai * aimsk00 )858 CALL iom_put( 'utau_bi' , ztaux_bi * aimsk00 )859 CALL iom_put( 'vtau_bi' , ztauy_bi * aimsk00 )830 CALL lbc_lnk( 'icedyn_rhg_eap', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, & 831 & ztauy_ai, 'V', -1.0_wp, ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 832 ! 833 CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) 834 CALL iom_put( 'vtau_oi' , ztauy_oi * zmsk00 ) 835 CALL iom_put( 'utau_ai' , ztaux_ai * zmsk00 ) 836 CALL iom_put( 'vtau_ai' , ztauy_ai * zmsk00 ) 837 CALL iom_put( 'utau_bi' , ztaux_bi * zmsk00 ) 838 CALL iom_put( 'vtau_bi' , ztauy_bi * zmsk00 ) 860 839 ENDIF 861 840 862 841 ! --- divergence, shear and strength --- ! 863 IF( iom_use('icediv') ) CALL iom_put( 'icediv' , pdivu_i * aimsk00 ) ! divergence864 IF( iom_use('iceshe') ) CALL iom_put( 'iceshe' , pshear_i * aimsk00 ) ! shear865 IF( iom_use('icedlt') ) CALL iom_put( 'icedlt' , pdelta_i * aimsk00 ) ! delta866 IF( iom_use('icestr') ) CALL iom_put( 'icestr' , strength * aimsk00 ) ! strength842 IF( iom_use('icediv') ) CALL iom_put( 'icediv' , pdivu_i * zmsk00 ) ! divergence 843 IF( iom_use('iceshe') ) CALL iom_put( 'iceshe' , pshear_i * zmsk00 ) ! shear 844 IF( iom_use('icedlt') ) CALL iom_put( 'icedlt' , pdelta_i * zmsk00 ) ! delta 845 IF( iom_use('icestr') ) CALL iom_put( 'icestr' , strength * zmsk00 ) ! strength 867 846 868 847 ! --- Stress tensor invariants (SIMIP diags) --- ! … … 889 868 ! 890 869 ! Stress tensor invariants (normal and shear stress N/m) - SIMIP diags - definitions following Coon (1974) and Feltham (2008) 891 IF( iom_use('normstr') ) CALL iom_put( 'normstr', zsig_I (:,:) * aimsk00(:,:) ) ! Normal stress892 IF( iom_use('sheastr') ) CALL iom_put( 'sheastr', zsig_II(:,:) * aimsk00(:,:) ) ! Maximum shear stress870 IF( iom_use('normstr') ) CALL iom_put( 'normstr', zsig_I (:,:) * zmsk00(:,:) ) ! Normal stress 871 IF( iom_use('sheastr') ) CALL iom_put( 'sheastr', zsig_II(:,:) * zmsk00(:,:) ) ! Maximum shear stress 893 872 894 873 DEALLOCATE ( zsig_I, zsig_II ) … … 934 913 IF( iom_use('yield11') .OR. iom_use('yield12') .OR. iom_use('yield22')) THEN 935 914 936 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zyield11, 'T', 1.0_wp, zyield22, 'T', 1.0_wp, zyield12, 'T', 1.0_wp )937 938 CALL iom_put( 'yield11', zyield11 * aimsk00 )939 CALL iom_put( 'yield22', zyield22 * aimsk00 )940 CALL iom_put( 'yield12', zyield12 * aimsk00 )915 CALL lbc_lnk( 'icedyn_rhg_eap', zyield11, 'T', 1.0_wp, zyield22, 'T', 1.0_wp, zyield12, 'T', 1.0_wp ) 916 917 CALL iom_put( 'yield11', zyield11 * zmsk00 ) 918 CALL iom_put( 'yield22', zyield22 * zmsk00 ) 919 CALL iom_put( 'yield12', zyield12 * zmsk00 ) 941 920 ENDIF 942 921 … … 944 923 IF( iom_use('aniso') ) THEN 945 924 CALL lbc_lnk( 'icedyn_rhg_eap', paniso_11, 'T', 1.0_wp ) 946 CALL iom_put( 'aniso' , paniso_11 * aimsk00 )925 CALL iom_put( 'aniso' , paniso_11 * zmsk00 ) 947 926 ENDIF 948 927 … … 951 930 & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 952 931 ! 953 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, &954 & 955 & 956 957 CALL iom_put( 'dssh_dx' , zspgU * aimsk00 ) ! Sea-surface tilt term in force balance (x)958 CALL iom_put( 'dssh_dy' , zspgV * aimsk00 ) ! Sea-surface tilt term in force balance (y)959 CALL iom_put( 'corstrx' , zCorU * aimsk00 ) ! Coriolis force term in force balance (x)960 CALL iom_put( 'corstry' , zCorV * aimsk00 ) ! Coriolis force term in force balance (y)961 CALL iom_put( 'intstrx' , zfU * aimsk00 ) ! Internal force term in force balance (x)962 CALL iom_put( 'intstry' , zfV * aimsk00 ) ! Internal force term in force balance (y)932 CALL lbc_lnk( 'icedyn_rhg_eap', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 933 & zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, & 934 & zfU, 'U', -1.0_wp, zfV, 'V', -1.0_wp ) 935 936 CALL iom_put( 'dssh_dx' , zspgU * zmsk00 ) ! Sea-surface tilt term in force balance (x) 937 CALL iom_put( 'dssh_dy' , zspgV * zmsk00 ) ! Sea-surface tilt term in force balance (y) 938 CALL iom_put( 'corstrx' , zCorU * zmsk00 ) ! Coriolis force term in force balance (x) 939 CALL iom_put( 'corstry' , zCorV * zmsk00 ) ! Coriolis force term in force balance (y) 940 CALL iom_put( 'intstrx' , zfU * zmsk00 ) ! Internal force term in force balance (x) 941 CALL iom_put( 'intstry' , zfV * zmsk00 ) ! Internal force term in force balance (y) 963 942 ENDIF 964 943 … … 971 950 DO_2D( 0, 0, 0, 0 ) 972 951 ! 2D ice mass, snow mass, area transport arrays (X, Y) 973 zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * aimsk00(ji,jj)974 zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * aimsk00(ji,jj)952 zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj) 953 zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * zmsk00(ji,jj) 975 954 976 955 zdiag_xmtrp_ice(ji,jj) = rhoi * zfac_x * ( vt_i(ji+1,jj) + vt_i(ji,jj) ) ! ice mass transport, X-component … … 985 964 END_2D 986 965 987 CALL lbc_lnk _multi( 'icedyn_rhg_eap', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, &988 & 989 & 966 CALL lbc_lnk( 'icedyn_rhg_eap', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 967 & zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 968 & zdiag_xatrp , 'U', -1.0_wp, zdiag_yatrp , 'V', -1.0_wp ) 990 969 991 970 CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice ) ! X-component of sea-ice mass transport (kg/s) … … 1006 985 IF( ln_aEVP ) THEN ! output: beta * ( u(t=nn_nevp) - u(t=nn_nevp-1) ) 1007 986 CALL iom_put( 'uice_cvg', MAX( ABS( u_ice(:,:) - zu_ice(:,:) ) * zbeta(:,:) * umask(:,:,1) , & 1008 & ABS( v_ice(:,:) - zv_ice(:,:) ) * zbeta(:,:) * vmask(:,:,1) ) * aimsk15(:,:) )987 & ABS( v_ice(:,:) - zv_ice(:,:) ) * zbeta(:,:) * vmask(:,:,1) ) * zmsk15(:,:) ) 1009 988 ELSE ! output: nn_nevp * ( u(t=nn_nevp) - u(t=nn_nevp-1) ) 1010 989 CALL iom_put( 'uice_cvg', REAL( nn_nevp ) * MAX( ABS( u_ice(:,:) - zu_ice(:,:) ) * umask(:,:,1) , & 1011 & ABS( v_ice(:,:) - zv_ice(:,:) ) * vmask(:,:,1) ) * aimsk15(:,:) )990 & ABS( v_ice(:,:) - zv_ice(:,:) ) * vmask(:,:,1) ) * zmsk15(:,:) ) 1012 991 ENDIF 1013 992 ENDIF … … 1017 996 1018 997 1019 SUBROUTINE rhg_cvg_eap( kt, kiter, kitermax, pu, pv, pub, pvb )998 SUBROUTINE rhg_cvg_eap( kt, kiter, kitermax, pu, pv, pub, pvb, pmsk15 ) 1020 999 !!---------------------------------------------------------------------- 1021 1000 !! *** ROUTINE rhg_cvg_eap *** … … 1032 1011 INTEGER , INTENT(in) :: kt, kiter, kitermax ! ocean time-step index 1033 1012 REAL(wp), DIMENSION(:,:), INTENT(in) :: pu, pv, pub, pvb ! now and before velocities 1013 REAL(wp), DIMENSION(:,:), INTENT(in) :: pmsk15 1034 1014 !! 1035 1015 INTEGER :: it, idtime, istatus … … 1066 1046 zresm = 0._wp 1067 1047 ELSE 1068 DO_2D( 1, 1, 1, 1 ) 1069 eap_res(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 1070 & ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * aimsk15(ji,jj) 1048 zresm = 0._wp 1049 DO_2D( 0, 0, 0, 0 ) 1071 1050 ! cut of the boundary of the box (forced velocities) 1072 IF (mjg(jj)<=30 .or. mjg(jj)>970 .or. mig(ji)<=30 .or. mig(ji)>970) THEN 1073 eap_res(ji,jj) = 0._wp 1074 END IF 1051 IF (mjg0(jj)>30 .AND. mjg0(jj)<=970 .AND. mig0(ji)>30 .AND. mig0(ji)<=970) THEN 1052 zresm = MAX( zresm, MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 1053 & ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * pmsk15(ji,jj) ) 1054 ENDIF 1075 1055 END_2D 1076 1077 zresm = MAXVAL( eap_res )1078 1056 CALL mpp_max( 'icedyn_rhg_evp', zresm ) ! max over the global domain 1079 1057 ENDIF -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/icedyn_rhg_evp.F90
r14021 r15574 48 48 PUBLIC rhg_evp_rst ! called by icedyn_rhg.F90 49 49 50 !! * Substitutions51 # include "do_loop_substitute.h90"52 # include "domzgr_substitute.h90"53 54 50 !! for convergence tests 55 51 INTEGER :: ncvgid ! netcdf file id 56 52 INTEGER :: nvarid ! netcdf variable id 57 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zmsk00, zmsk15 53 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: fimask ! mask at F points for the ice 54 55 !! * Substitutions 56 # include "do_loop_substitute.h90" 58 57 !!---------------------------------------------------------------------- 59 58 !! NEMO/ICE 4.0 , NEMO Consortium (2018) … … 163 162 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_base, ztauy_base ! ice-bottom stress at U-V points (landfast) 164 163 ! 164 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00, zmsk15 165 165 REAL(wp), DIMENSION(jpi,jpj) :: zmsk01x, zmsk01y ! dummy arrays 166 166 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00x, zmsk00y ! mask for ice presence 167 REAL(wp), DIMENSION(jpi,jpj) :: zfmask ! mask at F points for the ice168 167 169 168 REAL(wp), PARAMETER :: zepsi = 1.0e-20_wp ! tolerance parameter … … 187 186 ! 188 187 ! for diagnostics and convergence tests 189 ALLOCATE( zmsk00(jpi,jpj), zmsk15(jpi,jpj) )190 188 DO_2D( 1, 1, 1, 1 ) 191 189 zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice , 0 if no ice 192 zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less193 190 END_2D 194 ! 195 !!gm for Clem: OPTIMIZATION: I think zfmask can be computed one for all at the initialization.... 191 IF( nn_rhg_chkcvg > 0 ) THEN 192 DO_2D( 1, 1, 1, 1 ) 193 zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 194 END_2D 195 ENDIF 196 ! 196 197 !------------------------------------------------------------------------------! 197 198 ! 0) mask at F points for the ice 198 199 !------------------------------------------------------------------------------! 199 ! ocean/land mask 200 DO_2D( 1, 0, 1, 0 ) 201 zfmask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 202 END_2D 203 CALL lbc_lnk( 'icedyn_rhg_evp', zfmask, 'F', 1._wp ) 204 205 ! Lateral boundary conditions on velocity (modify zfmask) 206 DO_2D( 0, 0, 0, 0 ) 207 IF( zfmask(ji,jj) == 0._wp ) THEN 208 zfmask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 209 & vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 200 IF( kt == nit000 ) THEN 201 ! ocean/land mask 202 ALLOCATE( fimask(jpi,jpj) ) 203 IF( rn_ishlat == 0._wp ) THEN 204 DO_2D( 0, 0, 0, 0 ) 205 fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 206 END_2D 207 ELSE 208 DO_2D( 0, 0, 0, 0 ) 209 fimask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1) 210 ! Lateral boundary conditions on velocity (modify fimask) 211 IF( fimask(ji,jj) == 0._wp ) THEN 212 fimask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(ji,jj,1), umask(ji,jj+1,1), & 213 & vmask(ji,jj,1), vmask(ji+1,jj,1) ) ) 214 ENDIF 215 END_2D 210 216 ENDIF 211 END_2D 212 DO jj = 2, jpjm1 213 IF( zfmask(1,jj) == 0._wp ) THEN 214 zfmask(1 ,jj) = rn_ishlat * MIN( 1._wp , MAX( vmask(2,jj,1), umask(1,jj+1,1), umask(1,jj,1) ) ) 215 ENDIF 216 IF( zfmask(jpi,jj) == 0._wp ) THEN 217 zfmask(jpi,jj) = rn_ishlat * MIN( 1._wp , MAX( umask(jpi,jj+1,1), vmask(jpim1,jj,1), umask(jpi,jj-1,1) ) ) 218 ENDIF 219 END DO 220 DO ji = 2, jpim1 221 IF( zfmask(ji,1) == 0._wp ) THEN 222 zfmask(ji, 1 ) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,1,1), umask(ji,2,1), vmask(ji,1,1) ) ) 223 ENDIF 224 IF( zfmask(ji,jpj) == 0._wp ) THEN 225 zfmask(ji,jpj) = rn_ishlat * MIN( 1._wp , MAX( vmask(ji+1,jpj,1), vmask(ji-1,jpj,1), umask(ji,jpjm1,1) ) ) 226 ENDIF 227 END DO 228 CALL lbc_lnk( 'icedyn_rhg_evp', zfmask, 'F', 1._wp ) 229 217 CALL lbc_lnk( 'icedyn_rhg_evp', fimask, 'F', 1._wp ) 218 ENDIF 230 219 !------------------------------------------------------------------------------! 231 220 ! 1) define some variables and initialize arrays … … 320 309 321 310 END_2D 322 CALL lbc_lnk _multi( 'icedyn_rhg_evp', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp )311 CALL lbc_lnk( 'icedyn_rhg_evp', zmf, 'T', 1.0_wp, zdt_m, 'T', 1.0_wp ) 323 312 ! 324 313 ! !== Landfast ice parameterization ==! … … 371 360 zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj) & 372 361 & + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj) & 373 & ) * r1_e1e2f(ji,jj) * zfmask(ji,jj)362 & ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 374 363 375 364 END_2D … … 722 711 723 712 ! convergence test 724 IF( nn_rhg_chkcvg == 2 ) CALL rhg_cvg( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice )713 IF( nn_rhg_chkcvg == 2 ) CALL rhg_cvg( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice, zmsk15 ) 725 714 ! 726 715 ! ! ==================== ! … … 737 726 zds(ji,jj) = ( ( u_ice(ji,jj+1) * r1_e1u(ji,jj+1) - u_ice(ji,jj) * r1_e1u(ji,jj) ) * e1f(ji,jj) * e1f(ji,jj) & 738 727 & + ( v_ice(ji+1,jj) * r1_e2v(ji+1,jj) - v_ice(ji,jj) * r1_e2v(ji,jj) ) * e2f(ji,jj) * e2f(ji,jj) & 739 & ) * r1_e1e2f(ji,jj) * zfmask(ji,jj)728 & ) * r1_e1e2f(ji,jj) * fimask(ji,jj) 740 729 741 730 END_2D … … 770 759 771 760 END_2D 772 CALL lbc_lnk _multi( 'icedyn_rhg_evp', pshear_i, 'T', 1._wp, pdivu_i, 'T', 1._wp, pdelta_i, 'T', 1._wp, zten_i, 'T', 1._wp, &773 & 761 CALL lbc_lnk( 'icedyn_rhg_evp', pshear_i, 'T', 1._wp, pdivu_i, 'T', 1._wp, pdelta_i, 'T', 1._wp, zten_i, 'T', 1._wp, & 762 & zs1 , 'T', 1._wp, zs2 , 'T', 1._wp, zs12 , 'F', 1._wp ) 774 763 775 764 ! --- Store the stress tensor for the next time step --- ! … … 786 775 & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 787 776 ! 788 CALL lbc_lnk_multi( 'icedyn_rhg_evp', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, ztaux_ai, 'U', -1.0_wp, ztauy_ai, 'V', -1.0_wp, & 789 & ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 777 CALL lbc_lnk( 'icedyn_rhg_evp', ztaux_oi, 'U', -1.0_wp, ztauy_oi, 'V', -1.0_wp, & 778 & ztaux_ai, 'U', -1.0_wp, ztauy_ai, 'V', -1.0_wp, & 779 & ztaux_bi, 'U', -1.0_wp, ztauy_bi, 'V', -1.0_wp ) 790 780 ! 791 781 CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) … … 871 861 & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 872 862 ! 873 CALL lbc_lnk _multi( 'icedyn_rhg_evp', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, &874 & 863 CALL lbc_lnk( 'icedyn_rhg_evp', zspgU, 'U', -1.0_wp, zspgV, 'V', -1.0_wp, & 864 & zCorU, 'U', -1.0_wp, zCorV, 'V', -1.0_wp, zfU, 'U', -1.0_wp, zfV, 'V', -1.0_wp ) 875 865 876 866 CALL iom_put( 'dssh_dx' , zspgU * zmsk00 ) ! Sea-surface tilt term in force balance (x) … … 904 894 END_2D 905 895 906 CALL lbc_lnk _multi( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, &907 & 908 & 896 CALL lbc_lnk( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1.0_wp, zdiag_ymtrp_ice, 'V', -1.0_wp, & 897 & zdiag_xmtrp_snw, 'U', -1.0_wp, zdiag_ymtrp_snw, 'V', -1.0_wp, & 898 & zdiag_xatrp , 'U', -1.0_wp, zdiag_yatrp , 'V', -1.0_wp ) 909 899 910 900 CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice ) ! X-component of sea-ice mass transport (kg/s) … … 931 921 ENDIF 932 922 ENDIF 933 ENDIF 934 ! 935 DEALLOCATE( zmsk00, zmsk15 ) 923 ENDIF 936 924 ! 937 925 END SUBROUTINE ice_dyn_rhg_evp 938 926 939 927 940 SUBROUTINE rhg_cvg( kt, kiter, kitermax, pu, pv, pub, pvb )928 SUBROUTINE rhg_cvg( kt, kiter, kitermax, pu, pv, pub, pvb, pmsk15 ) 941 929 !!---------------------------------------------------------------------- 942 930 !! *** ROUTINE rhg_cvg *** … … 953 941 INTEGER , INTENT(in) :: kt, kiter, kitermax ! ocean time-step index 954 942 REAL(wp), DIMENSION(:,:), INTENT(in) :: pu, pv, pub, pvb ! now and before velocities 943 REAL(wp), DIMENSION(:,:), INTENT(in) :: pmsk15 955 944 !! 956 945 INTEGER :: it, idtime, istatus … … 958 947 REAL(wp) :: zresm ! local real 959 948 CHARACTER(len=20) :: clname 960 REAL(wp), DIMENSION(jpi,jpj) :: zres ! check convergence961 949 !!---------------------------------------------------------------------- 962 950 … … 988 976 zresm = 0._wp 989 977 ELSE 990 DO_2D( 1, 1, 1, 1 ) 991 zres(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 992 & ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj) 978 zresm = 0._wp 979 DO_2D( 0, 0, 0, 0 ) 980 ! cut of the boundary of the box (forced velocities) 981 IF (mjg0(jj)>30 .AND. mjg0(jj)<=970 .AND. mig0(ji)>30 .AND. mig0(ji)<=970) THEN 982 zresm = MAX( zresm, MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 983 & ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * pmsk15(ji,jj) ) 984 ENDIF 993 985 END_2D 994 995 ! cut of the boundary of the box (forced velocities)996 IF (mjg(jj)<=30 .or. mjg(jj)>970 .or. mig(ji)<=30 .or. mig(ji)>970) THEN997 zres(ji,jj) = 0._wp998 END IF999 1000 zresm = MAXVAL( zres )1001 986 CALL mpp_max( 'icedyn_rhg_evp', zresm ) ! max over the global domain 1002 987 ENDIF -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/usrdef_nam.F90
r14021 r15574 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 54 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 58 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 59 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 58 60 ! 59 61 INTEGER :: ios ! Local integer … … 81 83 zly = kpj*rn_dy*1.e-3 82 84 ! 83 kperio = 0 ! closed periodicity for the zoom 85 ldIperio = .FALSE. ; ldJperio = .FALSE. ! ICE_RHEO configuration : closed domain 86 ldNFold = .FALSE. ; cdNFtype = '-' 87 ! 84 88 ! ! control print 85 89 IF(lwp) THEN … … 98 102 WRITE(numout,*) ' Coriolis:', ln_corio 99 103 WRITE(numout,*) ' ' 100 WRITE(numout,*) ' Lateral boundary condition of the global domain'101 WRITE(numout,*) ' ICE_RHEO closed basin jperio = ', kperio102 104 ENDIF 103 105 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90
r14273 r15574 126 126 windv(ji,jj) = Umax/sqrt(d*1000)*(d-2*mjg(jj)*res)/((d-2*mig(ji)*res)**2+(d-2*mjg(jj)*res)**2*Rwind**2)**(1/4)*Rwind*min(kt*30./21600,1.) 127 127 END_2D 128 CALL lbc_lnk _multi( 'usrdef_sbc', windu, 'U', -1., windv, 'V', -1. )128 CALL lbc_lnk( 'usrdef_sbc', windu, 'U', -1., windv, 'V', -1. ) 129 129 130 130 wndm_ice(:,:) = 0._wp !!gm brutal.... … … 156 156 & * ( 0.5 * (windv(ji,jj+1) + windv(ji,jj) ) - r_vfac * v_ice(ji,jj) ) 157 157 END_2D 158 CALL lbc_lnk _multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. )158 CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 159 159 ! 160 160 END SUBROUTINE usrdef_sbc_ice_tau -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/EXPREF/namelist_cfg
r14229 r15574 27 27 !! namtsd data: temperature & salinity (default: OFF) 28 28 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 29 !! namc1d 1D configuration options ( "key_c1d")30 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")31 !! namc1d_uvd 1D data (currents) ( "key_c1d")29 !! namc1d 1D configuration options (ln_c1d =T) 30 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 31 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 32 32 !!====================================================================== 33 33 ! … … 50 50 !----------------------------------------------------------------------- 51 51 ln_read_cfg = .true. ! (=T) read the domain configuration file 52 / 53 !----------------------------------------------------------------------- 54 &namtile ! parameters of the tiling 55 !----------------------------------------------------------------------- 52 56 / 53 57 !----------------------------------------------------------------------- … … 77 81 / 78 82 !----------------------------------------------------------------------- 79 &namc1d ! 1D configuration options ( "key_c1d"default: PAPA station)80 !----------------------------------------------------------------------- 81 / 82 !----------------------------------------------------------------------- 83 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)84 !----------------------------------------------------------------------- 85 / 86 !----------------------------------------------------------------------- 87 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)83 &namc1d ! 1D configuration options (ln_c1d =T default: PAPA station) 84 !----------------------------------------------------------------------- 85 / 86 !----------------------------------------------------------------------- 87 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 88 !----------------------------------------------------------------------- 89 / 90 !----------------------------------------------------------------------- 91 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 88 92 !----------------------------------------------------------------------- 89 93 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/dtatsd.F90
r14090 r15574 6 6 !! History : OPA ! 1991-03 () Original code 7 7 !! - ! 1992-07 (M. Imbard) 8 !! 8.0 ! 1999-10 (M.A. Foujols, M. Imbard) NetCDF FORMAT 9 !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module 8 !! 8.0 ! 1999-10 (M.A. Foujols, M. Imbard) NetCDF FORMAT 9 !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module 10 10 !! 3.3 ! 2010-10 (C. Bricaud, S. Masson) use of fldread 11 11 !! 3.4 ! 2010-11 (G. Madec, C. Ethe) Merge of dtatem and dtasal + remove CPP keys … … 49 49 !!---------------------------------------------------------------------- 50 50 !! *** ROUTINE dta_tsd_init *** 51 !! 52 !! ** Purpose : initialisation of T & S input data 53 !! 51 !! 52 !! ** Purpose : initialisation of T & S input data 53 !! 54 54 !! ** Method : - Read namtsd namelist 55 !! - allocates T & S data structure 55 !! - allocates T & S data structure 56 56 !!---------------------------------------------------------------------- 57 57 LOGICAL, INTENT(in), OPTIONAL :: ld_tradmp ! force the initialization when tradp is used … … 77 77 78 78 IF( PRESENT( ld_tradmp ) ) ln_tsd_dmp = .TRUE. ! forces the initialization when tradmp is used 79 79 80 80 IF(lwp) THEN ! control print 81 81 WRITE(numout,*) … … 114 114 CALL ctl_stop( 'dta_tsd : unable to allocate T & S data arrays' ) ; RETURN 115 115 ENDIF 116 !117 116 ! ! fill sf_tsd with sn_tem & sn_sal and control print 118 117 slf_i(jp_tem) = sn_tem ; slf_i(jp_sal) = sn_sal … … 150 149 !!---------------------------------------------------------------------- 151 150 !! *** ROUTINE dta_tsd *** 152 !! 151 !! 153 152 !! ** Purpose : provides T and S data at kt 154 !! 153 !! 155 154 !! ** Method : - call fldread routine 156 !! - ORCA_R2: add some hand made alteration to read data 155 !! - ORCA_R2: add some hand made alteration to read data 157 156 !! - 'key_orca_lev10' interpolates on 10 times more levels 158 157 !! - s- or mixed z-s coordinate: vertical interpolation on model mesh … … 162 161 !! ** Action : ptsd T-S data on medl mesh and interpolated at time-step kt 163 162 !!---------------------------------------------------------------------- 164 INTEGER 165 CHARACTER(LEN=3) 163 INTEGER , INTENT(in ) :: kt ! ocean time-step 164 CHARACTER(LEN=3) , INTENT(in ) :: cddta ! dmp or ini 166 165 REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts), INTENT( out) :: ptsd ! T & S data 167 166 ! 168 167 INTEGER :: ji, jj, jk, jl, jkk ! dummy loop indicies 169 168 INTEGER :: ik, il0, il1, ii0, ii1, ij0, ij1 ! local integers 170 INTEGER :: itile171 169 REAL(wp):: zl, zi ! local scalars 172 170 REAL(wp), DIMENSION(jpk) :: ztp, zsp ! 1D workspace 173 171 !!---------------------------------------------------------------------- 174 172 ! 175 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only for the full domain 176 itile = ntile 177 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 173 IF( .NOT. l_istiled .OR. ntile == 1 ) THEN ! Do only for the full domain 174 IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE. ) ! Use full domain 178 175 179 176 SELECT CASE(cddta) … … 186 183 END SELECT 187 184 188 IF( ln_tile ) CALL dom_tile ( ntsi, ntsj, ntei, ntej, ktile = itile) ! Revert to tile domain185 IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE. ) ! Revert to tile domain 189 186 ENDIF 190 187 ! … … 206 203 IF( ln_sco ) THEN !== s- or mixed s-zps-coordinate ==! 207 204 ! 208 IF( ntile == 0.OR. ntile == 1 ) THEN ! Do only on the first tile205 IF( .NOT. l_istiled .OR. ntile == 1 ) THEN ! Do only on the first tile 209 206 IF( kt == nit000 .AND. lwp )THEN 210 207 WRITE(numout,*) … … 213 210 ENDIF 214 211 ! 215 DO_2D( 1, 1, 1, 1) ! vertical interpolation of T & S212 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) ! vertical interpolation of T & S 216 213 DO jk = 1, jpk ! determines the intepolated T-S profiles at each (i,j) points 217 214 zl = gdept_0(ji,jj,jk) … … 226 223 IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 227 224 zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 228 ztp(jk) = ptsd(ji,jj,jkk,jp_tem) + ( ptsd(ji,jj,jkk+1,jp_tem) - ptsd(ji,jj,jkk,jp_tem) ) * zi 225 ztp(jk) = ptsd(ji,jj,jkk,jp_tem) + ( ptsd(ji,jj,jkk+1,jp_tem) - ptsd(ji,jj,jkk,jp_tem) ) * zi 229 226 zsp(jk) = ptsd(ji,jj,jkk,jp_sal) + ( ptsd(ji,jj,jkk+1,jp_sal) - ptsd(ji,jj,jkk,jp_sal) ) * zi 230 227 ENDIF … … 239 236 ptsd(ji,jj,jpk,jp_sal) = 0._wp 240 237 END_2D 241 ! 238 ! 242 239 ELSE !== z- or zps- coordinate ==! 243 ! 240 ! 244 241 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 245 242 ptsd(ji,jj,jk,jp_tem) = ptsd(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) ! Mask … … 248 245 ! 249 246 IF( ln_zps ) THEN ! zps-coordinate (partial steps) interpolation at the last ocean level 250 DO_2D( 1, 1, 1, 1)251 ik = mbkt(ji,jj) 247 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 248 ik = mbkt(ji,jj) 252 249 IF( ik > 1 ) THEN 253 250 zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) … … 257 254 ik = mikt(ji,jj) 258 255 IF( ik > 1 ) THEN 259 zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) 256 zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) 260 257 ptsd(ji,jj,ik,jp_tem) = (1.-zl) * ptsd(ji,jj,ik,jp_tem) + zl * ptsd(ji,jj,ik+1,jp_tem) 261 258 ptsd(ji,jj,ik,jp_sal) = (1.-zl) * ptsd(ji,jj,ik,jp_sal) + zl * ptsd(ji,jj,ik+1,jp_sal) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/eosbn2.F90
r15155 r15574 31 31 !! bn2 : compute the Brunt-Vaisala frequency 32 32 !! eos_pt_from_ct: compute the potential temperature from the Conservative Temperature 33 !! eos_rab : generic interface of in situ thermal/haline expansion ratio 33 !! eos_rab : generic interface of in situ thermal/haline expansion ratio 34 34 !! eos_rab_3d : compute in situ thermal/haline expansion ratio 35 35 !! eos_rab_2d : compute in situ thermal/haline expansion ratio for 2d fields … … 46 46 USE in_out_manager ! I/O manager 47 47 USE lib_mpp ! MPP library 48 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 48 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 49 49 USE prtctl ! Print control 50 50 USE lbclnk ! ocean lateral boundary conditions … … 63 63 END INTERFACE 64 64 ! 65 INTERFACE eos_fzp 65 INTERFACE eos_fzp 66 66 MODULE PROCEDURE eos_fzp_2d, eos_fzp_0d 67 67 END INTERFACE … … 91 91 92 92 ! !!! simplified eos coefficients (default value: Vallis 2006) 93 REAL(wp), PUBLIC :: rn_a0 = 1.6550e-1_wp ! thermal expansion coeff. 94 REAL(wp), PUBLIC :: rn_b0 = 7.6554e-1_wp ! saline expansion coeff. 95 REAL(wp) :: rn_lambda1 = 5.9520e-2_wp ! cabbeling coeff. in T^2 96 REAL(wp) :: rn_lambda2 = 5.4914e-4_wp ! cabbeling coeff. in S^2 97 REAL(wp) :: rn_mu1 = 1.4970e-4_wp ! thermobaric coeff. in T 98 REAL(wp) :: rn_mu2 = 1.1090e-5_wp ! thermobaric coeff. in S 99 REAL(wp) :: rn_nu = 2.4341e-3_wp ! cabbeling coeff. in theta*salt 100 93 REAL(wp), PUBLIC :: rn_a0 = 1.6550e-1_wp ! thermal expansion coeff. 94 REAL(wp), PUBLIC :: rn_b0 = 7.6554e-1_wp ! saline expansion coeff. 95 REAL(wp) :: rn_lambda1 = 5.9520e-2_wp ! cabbeling coeff. in T^2 96 REAL(wp) :: rn_lambda2 = 5.4914e-4_wp ! cabbeling coeff. in S^2 97 REAL(wp) :: rn_mu1 = 1.4970e-4_wp ! thermobaric coeff. in T 98 REAL(wp) :: rn_mu2 = 1.1090e-5_wp ! thermobaric coeff. in S 99 REAL(wp) :: rn_nu = 2.4341e-3_wp ! cabbeling coeff. in theta*salt 100 101 101 ! TEOS10/EOS80 parameters 102 102 REAL(wp) :: r1_S0, r1_T0, r1_Z0, rdeltaS 103 103 104 104 ! EOS parameters 105 105 REAL(wp) :: EOS000 , EOS100 , EOS200 , EOS300 , EOS400 , EOS500 , EOS600 … … 119 119 REAL(wp) :: EOS022 120 120 REAL(wp) :: EOS003 , EOS103 121 REAL(wp) :: EOS013 122 121 REAL(wp) :: EOS013 122 123 123 ! ALPHA parameters 124 124 REAL(wp) :: ALP000 , ALP100 , ALP200 , ALP300 , ALP400 , ALP500 … … 135 135 REAL(wp) :: ALP012 136 136 REAL(wp) :: ALP003 137 137 138 138 ! BETA parameters 139 139 REAL(wp) :: BET000 , BET100 , BET200 , BET300 , BET400 , BET500 … … 162 162 REAL(wp) :: PEN002 , PEN102 163 163 REAL(wp) :: PEN012 164 164 165 165 ! ALPHA_PEN parameters 166 166 REAL(wp) :: APE000 , APE100 , APE200 , APE300 … … 365 365 INTEGER , INTENT(in ) :: ktts, ktrd, ktdep 366 366 REAL(wp), DIMENSION(A2D_T(ktts) ,JPK,JPTS), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 367 ! ! 2 : salinity [psu]367 ! ! 2 : salinity [psu] 368 368 REAL(wp), DIMENSION(A2D_T(ktrd) ,JPK ), INTENT( out) :: prd ! in situ density [-] 369 369 REAL(wp), DIMENSION(A2D_T(ktdep),JPK ), INTENT(in ) :: pdep ! depth [m] … … 380 380 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 381 381 ! 382 DO_3D( 1, 1, 1, 1, 1, jpkm1 )382 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 383 383 ! 384 384 zh = pdep(ji,jj,jk) * r1_Z0 ! depth … … 416 416 CASE( np_seos ) !== simplified EOS ==! 417 417 ! 418 DO_3D( 1, 1, 1, 1, 1, jpkm1 )418 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 419 419 zt = pts (ji,jj,jk,jp_tem) - 10._wp 420 420 zs = pts (ji,jj,jk,jp_sal) - 35._wp … … 425 425 & + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs - rn_mu2*zh ) * zs & 426 426 & - rn_nu * zt * zs 427 ! 427 ! 428 428 prd(ji,jj,jk) = zn * r1_rho0 * ztm ! density anomaly (masked) 429 429 END_3D … … 431 431 CASE( np_leos ) !== linear ISOMIP EOS ==! 432 432 ! 433 DO_3D( 1, 1, 1, 1, 1, jpkm1 )433 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 434 434 zt = pts (ji,jj,jk,jp_tem) - (-1._wp) 435 435 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp … … 478 478 INTEGER , INTENT(in ) :: ktts, ktrd, ktrhop, ktdep 479 479 REAL(wp), DIMENSION(A2D_T(ktts) ,JPK,JPTS), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 480 ! ! 2 : salinity [psu]480 ! ! 2 : salinity [psu] 481 481 REAL(wp), DIMENSION(A2D_T(ktrd) ,JPK ), INTENT( out) :: prd ! in situ density [-] 482 482 REAL(wp), DIMENSION(A2D_T(ktrhop),JPK ), INTENT( out) :: prhop ! potential density (surface referenced) … … 506 506 END DO 507 507 ! 508 DO_3D( 1, 1, 1, 1, 1, jpkm1 )508 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 509 509 ! 510 510 ! compute density (2*nn_sto_eos) times: … … 556 556 ! Non-stochastic equation of state 557 557 ELSE 558 DO_3D( 1, 1, 1, 1, 1, jpkm1 )558 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 559 559 ! 560 560 zh = pdep(ji,jj,jk) * r1_Z0 ! depth … … 591 591 END_3D 592 592 ENDIF 593 593 594 594 CASE( np_seos ) !== simplified EOS ==! 595 595 ! 596 DO_3D( 1, 1, 1, 1, 1, jpkm1 )596 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 597 597 zt = pts (ji,jj,jk,jp_tem) - 10._wp 598 598 zs = pts (ji,jj,jk,jp_sal) - 35._wp … … 612 612 CASE( np_leos ) !== linear ISOMIP EOS ==! 613 613 ! 614 DO_3D( 1, 1, 1, 1, 1, jpkm1 )614 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 615 615 zt = pts (ji,jj,jk,jp_tem) - (-1._wp) 616 616 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp … … 627 627 END SELECT 628 628 ! 629 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-pot: ', tab3d_2=prhop, clinfo2=' pot : ', kdim=jpk ) 629 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-pot: ', & 630 & tab3d_2=prhop, clinfo2=' pot : ', kdim=jpk ) 630 631 ! 631 632 IF( ln_timing ) CALL timing_stop('eos-pot') … … 658 659 INTEGER , INTENT(in ) :: ktts, ktdep, ktrd 659 660 REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 660 ! ! 2 : salinity [psu]661 ! ! 2 : salinity [psu] 661 662 REAL(wp), DIMENSION(A2D_T(ktdep) ), INTENT(in ) :: pdep ! depth [m] 662 663 REAL(wp), DIMENSION(A2D_T(ktrd) ), INTENT( out) :: prd ! in situ density … … 675 676 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 676 677 ! 677 DO_2D( 1, 1, 1, 1)678 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 678 679 ! 679 680 zh = pdep(ji,jj) * r1_Z0 ! depth … … 710 711 CASE( np_seos ) !== simplified EOS ==! 711 712 ! 712 DO_2D( 1, 1, 1, 1)713 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 713 714 ! 714 715 zt = pts (ji,jj,jp_tem) - 10._wp … … 726 727 CASE( np_leos ) !== ISOMIP EOS ==! 727 728 ! 728 DO_2D( 1, 1, 1, 1)729 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 729 730 ! 730 731 zt = pts (ji,jj,jp_tem) - (-1._wp) … … 749 750 750 751 SUBROUTINE eos_insitu_pot_2d( pts, prhop ) 752 !! 753 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 754 ! ! 2 : salinity [psu] 755 REAL(wp), DIMENSION(:,:) , INTENT( out) :: prhop ! potential density (surface referenced) 756 !! 757 CALL eos_insitu_pot_2d_t( pts, is_tile(pts), prhop, is_tile(prhop) ) 758 END SUBROUTINE eos_insitu_pot_2d 759 760 761 SUBROUTINE eos_insitu_pot_2d_t( pts, ktts, prhop, ktrhop ) 751 762 !!---------------------------------------------------------------------- 752 763 !! *** ROUTINE eos_insitu_pot *** … … 761 772 !! 762 773 !!---------------------------------------------------------------------- 763 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 774 INTEGER , INTENT(in ) :: ktts, ktrhop 775 REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 764 776 ! ! 2 : salinity [psu] 765 REAL(wp), DIMENSION( jpi,jpj), INTENT( out) :: prhop ! potential density (surface referenced)777 REAL(wp), DIMENSION(A2D_T(ktrhop) ), INTENT( out) :: prhop ! potential density (surface referenced) 766 778 ! 767 779 INTEGER :: ji, jj, jk, jsmp ! dummy loop indices … … 778 790 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 779 791 ! 780 DO_2D( 1, 1, 1, 1)781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 792 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 793 ! 794 zt = pts (ji,jj,jp_tem) * r1_T0 ! temperature 795 zs = SQRT( ABS( pts(ji,jj,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity 796 ztm = tmask(ji,jj,1) ! tmask 797 ! 798 zn0 = (((((EOS060*zt & 799 & + EOS150*zs+EOS050)*zt & 800 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 801 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 802 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 803 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 804 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 805 ! 806 ! 807 prhop(ji,jj) = zn0 * ztm ! potential density referenced at the surface 808 ! 809 END_2D 798 810 799 811 CASE( np_seos ) !== simplified EOS ==! 800 812 ! 801 DO_2D( 1, 1, 1, 1)813 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 802 814 zt = pts (ji,jj,jp_tem) - 10._wp 803 815 zs = pts (ji,jj,jp_sal) - 35._wp … … 813 825 CASE( np_leos ) !== ISOMIP EOS ==! 814 826 ! 815 DO_2D( 1, 1, 1, 1)827 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 816 828 ! 817 829 zt = pts (ji,jj,jp_tem) - (-1._wp) … … 826 838 ! 827 839 END SELECT 840 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=prhop, clinfo1=' pot: ', kdim=1 ) 828 841 ! 829 842 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=prhop, clinfo1=' eos-pot: ' ) … … 831 844 IF( ln_timing ) CALL timing_stop('eos-pot') 832 845 ! 833 END SUBROUTINE eos_insitu_pot_2d 846 END SUBROUTINE eos_insitu_pot_2d_t 834 847 835 848 … … 854 867 !! ** Action : - pab : thermal/haline expansion ratio at T-points 855 868 !!---------------------------------------------------------------------- 856 INTEGER , INTENT(in ) :: Kmm ! time level index869 INTEGER , INTENT(in ) :: Kmm ! time level index 857 870 INTEGER , INTENT(in ) :: ktts, ktab 858 871 REAL(wp), DIMENSION(A2D_T(ktts),JPK,JPTS), INTENT(in ) :: pts ! pot. temperature & salinity … … 870 883 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 871 884 ! 872 DO_3D( 1, 1, 1, 1, 1, jpkm1 )885 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 873 886 ! 874 887 zh = gdept(ji,jj,jk,Kmm) * r1_Z0 ! depth … … 923 936 CASE( np_seos ) !== simplified EOS ==! 924 937 ! 925 DO_3D( 1, 1, 1, 1, 1, jpkm1 )938 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 926 939 zt = pts (ji,jj,jk,jp_tem) - 10._wp ! pot. temperature anomaly (t-T0) 927 940 zs = pts (ji,jj,jk,jp_sal) - 35._wp ! abs. salinity anomaly (s-S0) … … 939 952 CASE( np_leos ) !== linear ISOMIP EOS ==! 940 953 ! 941 DO_3D( 1, 1, 1, 1, 1, jpkm1 )954 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 942 955 zt = pts (ji,jj,jk,jp_tem) - (-1._wp) 943 956 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp ! abs. salinity anomaly (s-S0) … … 986 999 !! ** Action : - pab : thermal/haline expansion ratio at T-points 987 1000 !!---------------------------------------------------------------------- 988 INTEGER 1001 INTEGER , INTENT(in ) :: Kmm ! time level index 989 1002 INTEGER , INTENT(in ) :: ktts, ktdep, ktab 990 1003 REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in ) :: pts ! pot. temperature & salinity … … 1005 1018 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 1006 1019 ! 1007 DO_2D( 1, 1, 1, 1)1020 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1008 1021 ! 1009 1022 zh = pdep(ji,jj) * r1_Z0 ! depth … … 1058 1071 CASE( np_seos ) !== simplified EOS ==! 1059 1072 ! 1060 DO_2D( 1, 1, 1, 1)1073 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1061 1074 ! 1062 1075 zt = pts (ji,jj,jp_tem) - 10._wp ! pot. temperature anomaly (t-T0) … … 1074 1087 CASE( np_leos ) !== linear ISOMIP EOS ==! 1075 1088 ! 1076 DO_2D( 1, 1, 1, 1)1089 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1077 1090 ! 1078 1091 zt = pts (ji,jj,jp_tem) - (-1._wp) ! pot. temperature anomaly (t-T0) … … 1226 1239 !! *** ROUTINE bn2 *** 1227 1240 !! 1228 !! ** Purpose : Compute the local Brunt-Vaisala frequency at the 1241 !! ** Purpose : Compute the local Brunt-Vaisala frequency at the 1229 1242 !! time-step of the input arguments 1230 1243 !! … … 1233 1246 !! N.B. N^2 is set one for all to zero at jk=1 in istate module. 1234 1247 !! 1235 !! ** Action : pn2 : square of the brunt-vaisala frequency at w-point 1236 !! 1237 !!---------------------------------------------------------------------- 1238 INTEGER , INTENT(in ) ::Kmm ! time level index1248 !! ** Action : pn2 : square of the brunt-vaisala frequency at w-point 1249 !! 1250 !!---------------------------------------------------------------------- 1251 INTEGER , INTENT(in ) :: Kmm ! time level index 1239 1252 INTEGER , INTENT(in ) :: ktab, ktn2 1240 REAL(wp), DIMENSION(jpi,jpj, jpk,jpts), INTENT(in ) :: pts ! pot. temperature and salinity [Celsius,psu]1253 REAL(wp), DIMENSION(jpi,jpj, jpk,jpts), INTENT(in ) :: pts ! pot. temperature and salinity [Celsius,psu] 1241 1254 REAL(wp), DIMENSION(A2D_T(ktab),JPK,JPTS), INTENT(in ) :: pab ! thermal/haline expansion coef. [Celsius-1,psu-1] 1242 1255 REAL(wp), DIMENSION(A2D_T(ktn2),JPK ), INTENT( out) :: pn2 ! Brunt-Vaisala frequency squared [1/s^2] … … 1248 1261 IF( ln_timing ) CALL timing_start('bn2') 1249 1262 ! 1250 DO_3D( 1, 1, 1, 1, 2, jpkm1 ) ! interior points only (2=< jk =< jpkm1 ); surface and bottom value set to zero one for all in istate.F901263 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, jpkm1 ) ! interior points only (2=< jk =< jpkm1 ); surface and bottom value set to zero one for all in istate.F90 1251 1264 zrw = ( gdepw(ji,jj,jk ,Kmm) - gdept(ji,jj,jk,Kmm) ) & 1252 & / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 1253 ! 1254 zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 1265 & / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 1266 ! 1267 zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 1255 1268 zbw = pab(ji,jj,jk,jp_sal) * (1. - zrw) + pab(ji,jj,jk-1,jp_sal) * zrw 1256 1269 ! … … 1296 1309 z1_T0 = 1._wp/40._wp 1297 1310 ! 1298 DO_2D( 1, 1, 1, 1)1311 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1299 1312 ! 1300 1313 zt = ctmp (ji,jj) * z1_T0 1301 zs = SQRT( ABS( psal(ji,jj) + zdeltaS ) * r1_S0 )1314 zs = SQRT( ABS( psal(ji,jj) + zdeltaS ) * z1_S0 ) 1302 1315 ztm = tmask(ji,jj,1) 1303 1316 ! … … 1324 1337 1325 1338 1326 SUBROUTINE 1339 SUBROUTINE eos_fzp_2d( psal, ptf, pdep ) 1327 1340 !! 1328 1341 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: psal ! salinity [psu] … … 1347 1360 !!---------------------------------------------------------------------- 1348 1361 INTEGER , INTENT(in ) :: kttf 1349 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: psal ! salinity [psu]1350 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ), OPTIONAL :: pdep ! depth [m]1362 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: psal ! salinity [psu] 1363 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ), OPTIONAL :: pdep ! depth [m] 1351 1364 REAL(wp), DIMENSION(A2D_T(kttf)), INTENT(out ) :: ptf ! freezing temperature [Celsius] 1352 1365 ! … … 1360 1373 ! 1361 1374 z1_S0 = 1._wp / 35.16504_wp 1362 DO_2D( 1, 1, 1, 1)1375 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1363 1376 zs= SQRT( ABS( psal(ji,jj) ) * z1_S0 ) ! square root salinity 1364 1377 ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs & … … 1380 1393 CALL ctl_stop( 'eos_fzp_2d:', ctmp1 ) 1381 1394 ! 1382 END SELECT 1395 END SELECT 1383 1396 ! 1384 1397 END SUBROUTINE eos_fzp_2d_t … … 1437 1450 !! ** Purpose : Calculates nonlinear anomalies of alpha_PE, beta_PE and PE at T-points 1438 1451 !! 1439 !! ** Method : PE is defined analytically as the vertical 1452 !! ** Method : PE is defined analytically as the vertical 1440 1453 !! primitive of EOS times -g integrated between 0 and z>0. 1441 1454 !! pen is the nonlinear bsq-PE anomaly: pen = ( PE - rho0 gz ) / rho0 gz - rd 1442 !! = 1/z * /int_0^z rd dz - rd 1455 !! = 1/z * /int_0^z rd dz - rd 1443 1456 !! where rd is the density anomaly (see eos_rhd function) 1444 1457 !! ab_pe are partial derivatives of PE anomaly with respect to T and S: … … 1467 1480 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 1468 1481 ! 1469 DO_3D( 1, 1, 1, 1, 1, jpkm1 )1482 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 1470 1483 ! 1471 1484 zh = gdept(ji,jj,jk,Kmm) * r1_Z0 ! depth … … 1504 1517 ! 1505 1518 zn = ( zn2 * zh + zn1 ) * zh + zn0 1506 ! 1519 ! 1507 1520 pab_pe(ji,jj,jk,jp_tem) = zn * zh * r1_rho0 * ztm 1508 1521 ! … … 1519 1532 ! 1520 1533 zn = ( zn2 * zh + zn1 ) * zh + zn0 1521 ! 1534 ! 1522 1535 pab_pe(ji,jj,jk,jp_sal) = zn / zs * zh * r1_rho0 * ztm 1523 1536 ! … … 1526 1539 CASE( np_seos ) !== Vallis (2006) simplified EOS ==! 1527 1540 ! 1528 DO_3D( 1, 1, 1, 1, 1, jpkm1 )1541 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 1529 1542 zt = pts(ji,jj,jk,jp_tem) - 10._wp ! temperature anomaly (t-T0) 1530 1543 zs = pts (ji,jj,jk,jp_sal) - 35._wp ! abs. salinity anomaly (s-S0) … … 1542 1555 CASE( np_leos ) !== linear ISOMIP EOS ==! 1543 1556 ! 1544 DO_3D( 1, 1, 1, 1, 1, jpkm1 )1557 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 1545 1558 zt = pts(ji,jj,jk,jp_tem) - (-1._wp) ! temperature anomaly (t-T0) 1546 1559 zs = pts (ji,jj,jk,jp_sal) - 34.2_wp ! abs. salinity anomaly (s-S0) … … 1617 1630 IF(lwp) WRITE(numout,*) ' ==>>> use of TEOS-10 equation of state (cons. temp. and abs. salinity)' 1618 1631 ! 1619 l_useCT = .TRUE. ! model temperature is Conservative temperature 1632 l_useCT = .TRUE. ! model temperature is Conservative temperature 1620 1633 ! 1621 1634 rdeltaS = 32._wp … … 1998 2011 1999 2012 r1_S0 = 0.875_wp/35.16504_wp ! Used to convert CT in potential temperature when using bulk formulae (eos_pt_from_ct) 2000 2013 2001 2014 IF(lwp) THEN 2002 2015 WRITE(numout,*) … … 2036 2049 END SELECT 2037 2050 ! 2038 rho0_rcp = rho0 * rcp 2051 rho0_rcp = rho0 * rcp 2039 2052 r1_rho0 = 1._wp / rho0 2040 2053 r1_rcp = 1._wp / rcp 2041 r1_rho0_rcp = 1._wp / rho0_rcp 2054 r1_rho0_rcp = 1._wp / rho0_rcp 2042 2055 ! 2043 2056 IF(lwp) THEN -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isf_oce.F90
r13583 r15574 1 1 MODULE isf_oce 2 2 !!====================================================================== 3 !! *** MODULE sbcisf***4 !! Surface module : compute iceshelf melt and heat flux3 !! *** MODULE isf_oce *** 4 !! Ice shelves : ice shelves variables defined in memory 5 5 !!====================================================================== 6 6 !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav … … 48 48 ! 49 49 ! 0.3 -------- ice shelf cavity parametrised namelist parameter ------------- 50 LOGICAL , PUBLIC :: ln_isfpar_mlt !: logical for the computation of melt inside the cavity 51 CHARACTER(LEN=256), PUBLIC :: cn_isfpar_mlt !: melt formulation (cavity/param) 52 TYPE(FLD_N) , PUBLIC :: sn_isfpar_fwf !: information about the isf melting file to be read 53 TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmax !: information about the grounding line depth file to be read 54 TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmin !: information about the calving line depth file to be read 55 TYPE(FLD_N) , PUBLIC :: sn_isfpar_Leff !: information about the effective length file to be read 50 LOGICAL , PUBLIC :: ln_isfpar_mlt !: logical for the computation of melt inside the cavity 51 REAL(wp) , PUBLIC :: rn_isfpar_bg03_gt0 !: temperature exchange coeficient [m/s] 52 CHARACTER(LEN=256), PUBLIC :: cn_isfpar_mlt !: melt formulation (cavity/param) 53 TYPE(FLD_N) , PUBLIC :: sn_isfpar_fwf !: information about the isf melting file to be read 54 TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmax !: information about the grounding line depth file to be read 55 TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmin !: information about the calving line depth file to be read 56 TYPE(FLD_N) , PUBLIC :: sn_isfpar_Leff !: information about the effective length file to be read 56 57 ! 57 58 ! 0.4 -------- coupling namelist parameter ------------- … … 147 148 END SUBROUTINE isf_alloc_par 148 149 150 149 151 SUBROUTINE isf_alloc_cav() 150 152 !!--------------------------------------------------------------------- … … 174 176 END SUBROUTINE isf_alloc_cav 175 177 178 176 179 SUBROUTINE isf_alloc_cpl() 177 180 !!--------------------------------------------------------------------- … … 185 188 ierr = 0 186 189 ! 187 ALLOCATE( risfcpl_ssh(jpi,jpj) , risfcpl_tsc(jpi,jpj,jpk,jpts), risfcpl_vol(jpi,jpj,jpk), STAT=ialloc )188 ierr = ierr + ialloc 189 ! 190 risfcpl_tsc(:,:,:,:) = 0. 0 ; risfcpl_vol(:,:,:) = 0.0 ; risfcpl_ssh(:,:) = 0.0191 192 IF ( ln_isfcpl_cons ) THEN193 ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , risfcpl_cons_ssh(jpi,jpj), STAT=ialloc )190 ALLOCATE( risfcpl_ssh(jpi,jpj) , risfcpl_tsc(jpi,jpj,jpk,jpts) , risfcpl_vol(jpi,jpj,jpk) , STAT=ialloc ) 191 ierr = ierr + ialloc 192 ! 193 risfcpl_tsc(:,:,:,:) = 0._wp ; risfcpl_vol(:,:,:) = 0._wp ; risfcpl_ssh(:,:) = 0._wp 194 195 IF ( ln_isfcpl_cons ) THEN 196 ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , risfcpl_cons_ssh(jpi,jpj) , STAT=ialloc ) 194 197 ierr = ierr + ialloc 195 198 ! 196 risfcpl_cons_tsc(:,:,:,:) = 0. 0 ; risfcpl_cons_vol(:,:,:) = 0.0 ; risfcpl_cons_ssh(:,:) = 0.0199 risfcpl_cons_tsc(:,:,:,:) = 0._wp ; risfcpl_cons_vol(:,:,:) = 0._wp ; risfcpl_cons_ssh(:,:) = 0._wp 197 200 ! 198 201 END IF … … 203 206 END SUBROUTINE isf_alloc_cpl 204 207 208 205 209 SUBROUTINE isf_dealloc_cpl() 206 210 !!--------------------------------------------------------------------- … … 214 218 ierr = 0 215 219 ! 216 DEALLOCATE( risfcpl_ssh , risfcpl_tsc, risfcpl_vol, STAT=ialloc )220 DEALLOCATE( risfcpl_ssh , risfcpl_tsc , risfcpl_vol , STAT=ialloc ) 217 221 ierr = ierr + ialloc 218 222 ! … … 222 226 END SUBROUTINE isf_dealloc_cpl 223 227 228 224 229 SUBROUTINE isf_alloc() 225 230 !!--------------------------------------------------------------------- … … 234 239 ierr = 0 ! set to zero if no array to be allocated 235 240 ! 236 ALLOCATE( fwfisf_par(jpi,jpj) , fwfisf_par_b(jpi,jpj),&237 & fwfisf_cav(jpi,jpj) , fwfisf_cav_b(jpi,jpj),&238 & fwfisf_oasis(jpi,jpj),STAT=ialloc )239 ierr = ierr + ialloc 240 ! 241 ALLOCATE( risf_par_tsc(jpi,jpj,jpts), risf_par_tsc_b(jpi,jpj,jpts), STAT=ialloc )242 ierr = ierr + ialloc 243 ! 244 ALLOCATE( risf_cav_tsc(jpi,jpj,jpts), risf_cav_tsc_b(jpi,jpj,jpts), STAT=ialloc )245 ierr = ierr + ialloc 246 ! 247 ALLOCATE( risfload(jpi,jpj), STAT=ialloc)248 ierr = ierr + ialloc 249 ! 250 ALLOCATE( mskisf_cav(jpi,jpj) , STAT=ialloc)241 ALLOCATE( fwfisf_par (jpi,jpj) , fwfisf_par_b(jpi,jpj) , & 242 & fwfisf_cav (jpi,jpj) , fwfisf_cav_b(jpi,jpj) , & 243 & fwfisf_oasis(jpi,jpj) , STAT=ialloc ) 244 ierr = ierr + ialloc 245 ! 246 ALLOCATE( risf_par_tsc(jpi,jpj,jpts) , risf_par_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 247 ierr = ierr + ialloc 248 ! 249 ALLOCATE( risf_cav_tsc(jpi,jpj,jpts) , risf_cav_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 250 ierr = ierr + ialloc 251 ! 252 ALLOCATE( risfload(jpi,jpj) , STAT=ialloc ) 253 ierr = ierr + ialloc 254 ! 255 ALLOCATE( mskisf_cav(jpi,jpj) , STAT=ialloc ) 251 256 ierr = ierr + ialloc 252 257 ! … … 255 260 ! 256 261 ! initalisation of fwf and tsc array to 0 257 risfload(:,:) = 0.0_wp 258 fwfisf_oasis(:,:) = 0.0_wp 259 fwfisf_par(:,:) = 0.0_wp ; fwfisf_par_b(:,:) = 0.0_wp 260 fwfisf_cav(:,:) = 0.0_wp ; fwfisf_cav_b(:,:) = 0.0_wp 261 risf_cav_tsc(:,:,:) = 0.0_wp ; risf_cav_tsc_b(:,:,:) = 0.0_wp 262 risf_par_tsc(:,:,:) = 0.0_wp ; risf_par_tsc_b(:,:,:) = 0.0_wp 263 ! 264 262 risfload (:,:) = 0._wp 263 fwfisf_oasis(:,:) = 0._wp 264 fwfisf_par (:,:) = 0._wp ; fwfisf_par_b (:,:) = 0._wp 265 fwfisf_cav (:,:) = 0._wp ; fwfisf_cav_b (:,:) = 0._wp 266 risf_cav_tsc(:,:,:) = 0._wp ; risf_cav_tsc_b(:,:,:) = 0._wp 267 risf_par_tsc(:,:,:) = 0._wp ; risf_par_tsc_b(:,:,:) = 0._wp 268 ! 265 269 END SUBROUTINE isf_alloc 266 270 271 !!====================================================================== 267 272 END MODULE isf_oce -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isfcavgam.F90
r13583 r15574 14 14 USE isftbl , ONLY: isf_tbl 15 15 16 USE oce , ONLY: uu, vv , rn2 ! ocean dynamics and tracers16 USE oce , ONLY: uu, vv ! ocean dynamics 17 17 USE phycst , ONLY: grav, vkarmn ! physical constant 18 18 USE eosbn2 , ONLY: eos_rab ! equation of state … … 30 30 PUBLIC isfcav_gammats 31 31 32 !! * Substitutions 33 # include "do_loop_substitute.h90" 32 34 # include "domzgr_substitute.h90" 33 35 !!---------------------------------------------------------------------- … … 42 44 !!----------------------------------------------------------------------------------------------------- 43 45 ! 44 SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, p gt, pgs )46 SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, pRc, pgt, pgs ) 45 47 !!---------------------------------------------------------------------- 46 48 !! ** Purpose : compute the coefficient echange for heat and fwf flux … … 55 57 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pqoce, pqfwf ! isf heat and fwf 56 58 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pttbl, pstbl ! top boundary layer tracer 59 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pRc ! Richardson number 57 60 !!--------------------------------------------------------------------- 58 61 REAL(wp), DIMENSION(jpi,jpj) :: zutbl, zvtbl ! top boundary layer velocity … … 92 95 pgs(:,:) = rn_gammas0 93 96 CASE ( 'vel' ) ! gamma is proportional to u* 94 CALL gammats_vel ( zutbl, zvtbl, rCd0_top, rn_vtide**2, pgt, pgs )97 CALL gammats_vel ( zutbl, zvtbl, rCd0_top, rn_vtide**2, pgt, pgs ) 95 98 CASE ( 'vel_stab' ) ! gamma depends of stability of boundary layer and u* 96 CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, rn_vtide**2, pqoce, pqfwf, p gt, pgs )99 CALL gammats_vel_stab (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, rn_vtide**2, pqoce, pqfwf, pRc, pgt, pgs ) 97 100 CASE DEFAULT 98 101 CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') … … 133 136 REAL(wp), INTENT(in ) :: pke2 ! background velocity 134 137 !!--------------------------------------------------------------------- 138 INTEGER :: ji, jj ! loop index 135 139 REAL(wp), DIMENSION(jpi,jpj) :: zustar 136 140 !!--------------------------------------------------------------------- 137 141 ! 138 ! compute ustar (AD15 eq. 27) 139 zustar(:,:) = SQRT( pCd(:,:) * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) ) * mskisf_cav(:,:) 140 ! 141 ! Compute gammats 142 pgt(:,:) = zustar(:,:) * rn_gammat0 143 pgs(:,:) = zustar(:,:) * rn_gammas0 142 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 143 ! compute ustar (AD15 eq. 27) 144 zustar(ji,jj) = SQRT( pCd(ji,jj) * ( putbl(ji,jj) * putbl(ji,jj) + pvtbl(ji,jj) * pvtbl(ji,jj) + pke2 ) ) * mskisf_cav(ji,jj) 145 ! 146 ! Compute gammats 147 pgt(ji,jj) = zustar(ji,jj) * rn_gammat0 148 pgs(ji,jj) = zustar(ji,jj) * rn_gammas0 149 END_2D 144 150 ! 145 151 ! output ustar … … 148 154 END SUBROUTINE gammats_vel 149 155 150 SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, & ! <<== in151 & pgt , pgs ) ! ==>> out gammats [m/s]156 SUBROUTINE gammats_vel_stab( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, pRc, & ! <<== in 157 & pgt , pgs ) ! ==>> out gammats [m/s] 152 158 !!---------------------------------------------------------------------- 153 159 !! ** Purpose : compute the coefficient echange coefficient … … 166 172 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: putbl, pvtbl ! velocity in the losch top boundary layer 167 173 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pttbl, pstbl ! tracer in the losch top boundary layer 174 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pRc ! Richardson number 168 175 !!--------------------------------------------------------------------- 169 176 INTEGER :: ji, jj ! loop index 170 177 INTEGER :: ikt ! local integer 171 178 REAL(wp) :: zdku, zdkv ! U, V shear 172 REAL(wp) :: zPr, zSc , zRc ! Prandtl, Scmidth and Richardsonnumber179 REAL(wp) :: zPr, zSc ! Prandtl and Scmidth number 173 180 REAL(wp) :: zmob, zmols ! Monin Obukov length, coriolis factor at T point 174 181 REAL(wp) :: zbuofdep, zhnu ! Bouyancy length scale, sublayer tickness … … 185 192 !!--------------------------------------------------------------------- 186 193 ! 187 ! compute ustar188 zustar(:,:) = SQRT( pCd * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) )189 !190 ! output ustar191 CALL iom_put('isfustar',zustar(:,:))192 !193 194 ! compute Pr and Sc number (eq ??) 194 195 zPr = 13.8_wp … … 200 201 ! 201 202 ! compute gamma 202 DO ji = 2, jpi 203 DO jj = 2, jpj 204 ikt = mikt(ji,jj) 205 206 IF( zustar(ji,jj) == 0._wp ) THEN ! only for kt = 1 I think 207 pgt = rn_gammat0 208 pgs = rn_gammas0 209 ELSE 210 ! compute Rc number (as done in zdfric.F90) 211 !!gm better to do it like in the new zdfric.F90 i.e. avm weighted Ri computation 212 zcoef = 0.5_wp / e3w(ji,jj,ikt+1,Kmm) 213 ! ! shear of horizontal velocity 214 zdku = zcoef * ( uu(ji-1,jj ,ikt ,Kmm) + uu(ji,jj,ikt ,Kmm) & 215 & -uu(ji-1,jj ,ikt+1,Kmm) - uu(ji,jj,ikt+1,Kmm) ) 216 zdkv = zcoef * ( vv(ji ,jj-1,ikt ,Kmm) + vv(ji,jj,ikt ,Kmm) & 217 & -vv(ji ,jj-1,ikt+1,Kmm) - vv(ji,jj,ikt+1,Kmm) ) 218 ! ! richardson number (minimum value set to zero) 219 zRc = MAX(rn2(ji,jj,ikt+1), 0._wp) / MAX( zdku*zdku + zdkv*zdkv, zeps ) 220 221 ! compute bouyancy 222 zts(jp_tem) = pttbl(ji,jj) 223 zts(jp_sal) = pstbl(ji,jj) 224 zdep = gdepw(ji,jj,ikt,Kmm) 225 ! 226 CALL eos_rab( zts, zdep, zab, Kmm ) 227 ! 228 ! compute length scale (Eq ??) 229 zbuofdep = grav * ( zab(jp_tem) * pqoce(ji,jj) - zab(jp_sal) * pqfwf(ji,jj) ) 230 ! 231 ! compute Monin Obukov Length 232 ! Maximum boundary layer depth (Eq ??) 233 zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 234 ! 235 ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) 236 zmob = zustar(ji,jj) ** 3 / (vkarmn * (zbuofdep + zeps)) 237 zmols = SIGN(1._wp, zmob) * MIN(ABS(zmob), zhmax) * tmask(ji,jj,ikt) 238 ! 239 ! compute eta* (stability parameter) (Eq ??) 240 zetastar = 1._wp / ( SQRT(1._wp + MAX(zxsiN * zustar(ji,jj) / ( ABS(ff_f(ji,jj)) * zmols * zRc ), 0._wp))) 241 ! 242 ! compute the sublayer thickness (Eq ??) 243 zhnu = 5 * znu / zustar(ji,jj) 244 ! 245 ! compute gamma turb (Eq ??) 246 zgturb = 1._wp / vkarmn * LOG(zustar(ji,jj) * zxsiN * zetastar * zetastar / ( ABS(ff_f(ji,jj)) * zhnu )) & 203 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 204 205 ikt = mikt(ji,jj) 206 207 ! compute ustar 208 zustar(ji,jj) = SQRT( pCd(ji,jj) * ( putbl(ji,jj) * putbl(ji,jj) + pvtbl(ji,jj) * pvtbl(ji,jj) + pke2 ) ) 209 210 IF( zustar(ji,jj) == 0._wp ) THEN ! only for kt = 1 I think 211 pgt(ji,jj) = rn_gammat0 212 pgs(ji,jj) = rn_gammas0 213 ELSE 214 ! compute bouyancy 215 zts(jp_tem) = pttbl(ji,jj) 216 zts(jp_sal) = pstbl(ji,jj) 217 zdep = gdepw(ji,jj,ikt,Kmm) 218 ! 219 CALL eos_rab( zts, zdep, zab, Kmm ) 220 ! 221 ! compute length scale (Eq ??) 222 zbuofdep = grav * ( zab(jp_tem) * pqoce(ji,jj) - zab(jp_sal) * pqfwf(ji,jj) ) 223 ! 224 ! compute Monin Obukov Length 225 ! Maximum boundary layer depth (Eq ??) 226 zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 227 ! 228 ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) 229 zmob = zustar(ji,jj) ** 3 / (vkarmn * (zbuofdep + zeps)) 230 zmols = SIGN(1._wp, zmob) * MIN(ABS(zmob), zhmax) * tmask(ji,jj,ikt) 231 ! 232 ! compute eta* (stability parameter) (Eq ??) 233 zetastar = 1._wp / ( SQRT(1._wp + MAX( 0._wp, zxsiN * zustar(ji,jj) & 234 & / MAX( 1.e-20, ABS(ff_t(ji,jj)) * zmols * pRc(ji,jj) ) ))) 235 ! 236 ! compute the sublayer thickness (Eq ??) 237 zhnu = 5 * znu / MAX( 1.e-20, zustar(ji,jj) ) 238 ! 239 ! compute gamma turb (Eq ??) 240 zgturb = 1._wp / vkarmn * LOG(zustar(ji,jj) * zxsiN * zetastar * zetastar / MAX( 1.e-10, ABS(ff_t(ji,jj)) * zhnu )) & 247 241 & + 1._wp / ( 2 * zxsiN * zetastar ) - 1._wp / vkarmn 248 ! 249 ! compute gammats 250 pgt(ji,jj) = zustar(ji,jj) / (zgturb + zgmolet) 251 pgs(ji,jj) = zustar(ji,jj) / (zgturb + zgmoles) 252 END IF 253 END DO 254 END DO 242 ! 243 ! compute gammats 244 pgt(ji,jj) = zustar(ji,jj) / (zgturb + zgmolet) 245 pgs(ji,jj) = zustar(ji,jj) / (zgturb + zgmoles) 246 END IF 247 END_2D 248 ! output ustar 249 CALL iom_put('isfustar',zustar(:,:)) 255 250 256 251 END SUBROUTINE gammats_vel_stab -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/isfstp.F90
r13583 r15574 2 2 !!====================================================================== 3 3 !! *** MODULE isfstp *** 4 !! Surface module: compute iceshelf load, melt and heat flux4 !! Ice Shelves : compute iceshelf load, melt and heat flux 5 5 !!====================================================================== 6 6 !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav … … 42 42 !! Software governed by the CeCILL license (see ./LICENSE) 43 43 !!---------------------------------------------------------------------- 44 45 44 CONTAINS 46 45 47 SUBROUTINE isf_stp( kt, Kmm )46 SUBROUTINE isf_stp( kt, Kmm ) 48 47 !!--------------------------------------------------------------------- 49 48 !! *** ROUTINE isf_stp *** … … 58 57 !! - compute fluxes 59 58 !! - write restart variables 60 !! 61 !!---------------------------------------------------------------------- 62 INTEGER, INTENT(in) :: kt ! ocean time step 63 INTEGER, INTENT(in) :: Kmm ! ocean time level index 64 !!---------------------------------------------------------------------- 65 INTEGER :: jk ! loop index 66 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t ! e3t 59 !!---------------------------------------------------------------------- 60 INTEGER, INTENT(in) :: kt ! ocean time step 61 INTEGER, INTENT(in) :: Kmm ! ocean time level index 62 ! 63 INTEGER :: jk ! loop index 64 #if defined key_qco 65 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t ! 3D workspace 66 #endif 67 67 !!--------------------------------------------------------------------- 68 68 ! … … 83 83 ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 84 84 rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 85 #if defined key_qco 85 86 DO jk = 1, jpk 86 87 ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 87 88 END DO 88 CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 89 CALL isf_tbl_lvl( ht(:,:), ze3t , misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 90 #else 91 CALL isf_tbl_lvl( ht(:,:), e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 92 #endif 89 93 ! 90 94 ! 1.3: compute ice shelf melt 91 CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav )95 CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav ) 92 96 ! 93 97 END IF … … 108 112 ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 109 113 rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 114 #if defined key_qco 110 115 DO jk = 1, jpk 111 116 ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 112 117 END DO 113 CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 118 CALL isf_tbl_lvl( ht(:,:), ze3t , misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 119 #else 120 CALL isf_tbl_lvl( ht(:,:), e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 121 #endif 114 122 ! 115 123 ! 2.3: compute ice shelf melt 116 CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par )124 CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par ) 117 125 ! 118 126 END IF … … 128 136 END SUBROUTINE isf_stp 129 137 130 SUBROUTINE isf_init(Kbb, Kmm, Kaa) 138 139 SUBROUTINE isf_init( Kbb, Kmm, Kaa ) 131 140 !!--------------------------------------------------------------------- 132 141 !! *** ROUTINE isfstp_init *** … … 142 151 !! - call cav/param/isfcpl init routine 143 152 !!---------------------------------------------------------------------- 144 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 153 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 154 !!---------------------------------------------------------------------- 145 155 ! 146 156 ! constrain: l_isfoasis need to be known 147 157 ! 148 ! Read namelist 149 CALL isf_nam() 150 ! 151 ! Allocate public array 152 CALL isf_alloc() 153 ! 154 ! check option compatibility 155 CALL isf_ctl() 156 ! 157 ! compute ice shelf load 158 IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 158 CALL isf_nam() ! Read namelist 159 ! 160 CALL isf_alloc() ! Allocate public array 161 ! 162 CALL isf_ctl() ! check option compatibility 163 ! 164 IF( ln_isfcav ) CALL isf_load( Kmm, risfload ) ! compute ice shelf load 159 165 ! 160 166 ! terminate routine now if no ice shelf melt formulation specify 161 IF ( ln_isf ) THEN 162 ! 163 !--------------------------------------------------------------------------------------------------------------------- 164 ! initialisation melt in the cavity 165 IF ( ln_isfcav_mlt ) CALL isf_cav_init() 166 ! 167 !--------------------------------------------------------------------------------------------------------------------- 168 ! initialisation parametrised melt 169 IF ( ln_isfpar_mlt ) CALL isf_par_init() 170 ! 171 !--------------------------------------------------------------------------------------------------------------------- 172 ! initialisation ice sheet coupling 173 IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 167 IF( ln_isf ) THEN 168 ! 169 IF( ln_isfcav_mlt ) CALL isf_cav_init() ! initialisation melt in the cavity 170 ! 171 IF( ln_isfpar_mlt ) CALL isf_par_init() ! initialisation parametrised melt 172 ! 173 IF( ln_isfcpl ) CALL isfcpl_init( Kbb, Kmm, Kaa ) ! initialisation ice sheet coupling 174 174 ! 175 175 END IF … … 177 177 END SUBROUTINE isf_init 178 178 179 179 180 SUBROUTINE isf_ctl() 180 181 !!--------------------------------------------------------------------- … … 283 284 END IF 284 285 END SUBROUTINE isf_ctl 285 ! 286 287 286 288 SUBROUTINE isf_nam 287 289 !!--------------------------------------------------------------------- … … 299 301 & sn_isfpar_zmin, sn_isfpar_zmax, sn_isfpar_Leff, & 300 302 & ln_isfcpl , nn_drown , ln_isfcpl_cons, ln_isfdebug, rn_vtide, & 301 & cn_isfload , rn_isfload_T , rn_isfload_S , cn_isfdir 303 & cn_isfload , rn_isfload_T , rn_isfload_S , cn_isfdir , & 304 & rn_isfpar_bg03_gt0 302 305 !!---------------------------------------------------------------------- 303 306 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/istate.F90
r14053 r15574 34 34 USE lib_mpp ! MPP library 35 35 USE restart ! restart 36 36 37 #if defined key_agrif 38 USE agrif_oce ! initial state interpolation 37 39 USE agrif_oce_interp 38 USE agrif_oce39 40 #endif 40 41 … … 42 43 PRIVATE 43 44 44 PUBLIC istate_init ! routine called by step.F9045 PUBLIC istate_init ! routine called by nemogcm.F90 45 46 46 47 !! * Substitutions … … 63 64 ! 64 65 INTEGER :: ji, jj, jk ! dummy loop indices 65 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgdept ! 3D table !!st patch to use gdept subtitute66 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgdept ! 3D table for qco substitute 66 67 !!gm see comment further down 67 68 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: zuvd ! U & V data workspace … … 73 74 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 74 75 75 !!gm Why not include in the first call of dta_tsd ? 76 !!gm probably associated with the use of internal damping... 77 CALL dta_tsd_init ! Initialisation of T & S input data 78 !!gm to be moved in usrdef of C1D case 79 ! IF( lk_c1d ) CALL dta_uvd_init ! Initialization of U & V input data 80 !!gm 76 CALL dta_tsd_init ! Initialisation of T & S input data 77 IF( ln_c1d) CALL dta_uvd_init ! Initialisation of U & V input data (c1d only) 81 78 82 rhd (:,:,: ) = 0._wp ; rhop (:,:,: ) = 0._wp ! set one for all to 0 at level jpk83 rn2b (:,:,: ) = 0._wp ; rn2 (:,:,: ) = 0._wp ! set one for all to 0 at levels 1 and jpk84 ts (:,:,:,:,Kaa) = 0._wp ! set one for all to 0 at level jpk85 rab_b(:,:,:,: ) = 0._wp ; rab_n(:,:,:,:) = 0._wp ! set one for all to 0 at level jpk79 rhd (:,:,: ) = 0._wp ; rhop (:,:,: ) = 0._wp ! set one for all to 0 at level jpk 80 rn2b (:,:,: ) = 0._wp ; rn2 (:,:,: ) = 0._wp ! set one for all to 0 at levels 1 and jpk 81 ts (:,:,:,:,Kaa) = 0._wp ! set one for all to 0 at level jpk 82 rab_b(:,:,:,: ) = 0._wp ; rab_n(:,:,:,:) = 0._wp ! set one for all to 0 at level jpk 86 83 #if defined key_agrif 87 84 uu (:,:,: ,Kaa) = 0._wp ! used in agrif_oce_sponge at initialization … … 94 91 ln_1st_euler = .true. ! Set time-step indicator at nit000 (euler forward) 95 92 CALL day_init 96 CALL agrif_istate ( Kbb, Kmm, Kaa ) ! Interp from parent93 CALL agrif_istate_oce( Kbb, Kmm, Kaa ) ! Interp from parent 97 94 ! 98 ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) 99 ssh (:,:,Kmm) = ssh(:,:,Kbb) 100 uu (:,:,:,Kmm) = uu (:,:,:,Kbb) 101 vv (:,:,:,Kmm) = vv (:,:,:,Kbb) 95 ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) 96 uu (:,:,: ,Kmm) = uu (:,:,: ,Kbb) 97 vv (:,:,: ,Kmm) = vv (:,:,: ,Kbb) 102 98 ELSE 103 99 #endif 104 IF( ln_rstart ) THEN ! Restart from a file 105 ! ! ------------------- 106 CALL rst_read( Kbb, Kmm ) ! Read the restart file 107 CALL day_init ! model calendar (using both namelist and restart infos) 108 ! 109 ELSE ! Start from rest 110 ! ! --------------- 111 numror = 0 ! define numror = 0 -> no restart file to read 112 l_1st_euler = .true. ! Set time-step indicator at nit000 (euler forward) 113 CALL day_init ! model calendar (using both namelist and restart infos) 114 ! ! Initialization of ocean to zero 115 ! 116 IF( ln_tsd_init ) THEN 117 CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) ) ! read 3D T and S data at nit000 100 IF( ln_rstart ) THEN ! Restart from a file 101 ! ! ------------------- 102 CALL rst_read( Kbb, Kmm ) ! Read the restart file 103 CALL day_init ! model calendar (using both namelist and restart infos) 118 104 ! 119 uu (:,:,:,Kbb) = 0._wp 120 vv (:,:,:,Kbb) = 0._wp 105 ELSE ! Start from rest 106 ! ! --------------- 107 numror = 0 ! define numror = 0 -> no restart file to read 108 l_1st_euler = .true. ! Set time-step indicator at nit000 (euler forward) 109 CALL day_init ! model calendar (using both namelist and restart infos) 110 ! ! Initialization of ocean to zero 121 111 ! 122 ELSE ! user defined initial T and S 123 DO jk = 1, jpk 124 zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 125 END DO 126 CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) ) 127 ENDIF 128 ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) ! set now values from to before ones 129 uu (:,:,:,Kmm) = uu (:,:,:,Kbb) 130 vv (:,:,:,Kmm) = vv (:,:,:,Kbb) 112 IF( ln_tsd_init ) THEN 113 CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) ) ! read 3D T and S data at nit000 114 ENDIF 115 ! 116 IF( ln_uvd_init .AND. ln_c1d ) THEN 117 CALL dta_uvd( nit000, Kbb, uu(:,:,:,Kbb), vv(:,:,:,Kbb) ) ! read 3D U and V data at nit000 118 ELSE 119 uu (:,:,:,Kbb) = 0._wp ! set the ocean at rest 120 vv (:,:,:,Kbb) = 0._wp 121 ENDIF 122 ! 123 ! 124 IF( .NOT. ln_tsd_init .AND. .NOT. ln_uvd_init ) THEN 125 DO jk = 1, jpk 126 zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 127 END DO 128 CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb) ) 129 ENDIF 130 ts (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb) ! set now values from to before ones 131 uu (:,:,:,Kmm) = uu (:,:,:,Kbb) 132 vv (:,:,:,Kmm) = vv (:,:,:,Kbb) 131 133 132 !!gm POTENTIAL BUG : 133 !!gm ISSUE : if ssh(:,:,Kbb) /= 0 then, in non linear free surface, the e3._n, e3._b should be recomputed 134 !! as well as gdept_ and gdepw_.... !!!!! 135 !! ===>>>> probably a call to domvvl initialisation here.... 136 137 138 ! 139 !!gm to be moved in usrdef of C1D case 140 ! IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 141 ! ALLOCATE( zuvd(jpi,jpj,jpk,2) ) 142 ! CALL dta_uvd( nit000, zuvd ) 143 ! uu(:,:,:,Kbb) = zuvd(:,:,:,1) ; uu(:,:,:,Kmm) = uu(:,:,:,Kbb) 144 ! vv(:,:,:,Kbb) = zuvd(:,:,:,2) ; vv(:,:,:,Kmm) = vv(:,:,:,Kbb) 145 ! DEALLOCATE( zuvd ) 146 ! ENDIF 147 ! 148 !!gm This is to be changed !!!! 149 ! ! - ML - ssh(:,:,Kmm) could be modified by istate_eel, so that initialization of e3t(:,:,:,Kbb) is done here 150 ! IF( .NOT.ln_linssh ) THEN 151 ! DO jk = 1, jpk 152 ! e3t(:,:,jk,Kbb) = e3t(:,:,jk,Kmm) 153 ! END DO 154 ! ENDIF 155 !!gm 156 ! 157 ENDIF 134 ENDIF 158 135 #if defined key_agrif 159 136 ENDIF … … 167 144 ! 168 145 !!gm the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked 169 DO_3D( 1, 1, 1, 1, 1, jpkm1 )146 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 170 147 uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk) 171 148 vv_b(ji,jj,Kmm) = vv_b(ji,jj,Kmm) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) * vmask(ji,jj,jk) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/sbcfwb.F90
r13583 r15574 24 24 ! 25 25 USE in_out_manager ! I/O manager 26 USE iom ! IOM 26 27 USE lib_mpp ! distribued memory computing library 27 28 USE timing ! Timing … … 34 35 PUBLIC sbc_fwb ! routine called by step 35 36 36 REAL(wp) :: a_fwb_b ! annual domain averaged freshwater budget37 REAL(wp) :: a_fwb ! for 2 year before (_b) and before year.38 REAL(wp) :: fwfold ! fwfold to be suppressed37 REAL(wp) :: rn_fwb0 ! initial freshwater adjustment flux [kg/m2/s] (nn_fwb = 2 only) 38 REAL(wp) :: a_fwb ! annual domain averaged freshwater budget from the 39 ! previous year 39 40 REAL(wp) :: area ! global mean ocean surface (interior domain) 40 41 … … 65 66 INTEGER, INTENT( in ) :: Kmm ! ocean time level index 66 67 ! 67 INTEGER :: i num, ikty, iyear! local integers68 INTEGER :: ios, inum, ikty ! local integers 68 69 REAL(wp) :: z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp ! local scalars 69 70 REAL(wp) :: zsurf_neg, zsurf_pos, zsurf_tospread, zcoef ! - - … … 72 73 REAL(wp) ,DIMENSION(1) :: z_fwfprv 73 74 COMPLEX(dp),DIMENSION(1) :: y_fwfnow 75 ! 76 NAMELIST/namsbc_fwb/rn_fwb0 74 77 !!---------------------------------------------------------------------- 75 78 ! 76 79 IF( kt == nit000 ) THEN 80 READ( numnam_ref, namsbc_fwb, IOSTAT = ios, ERR = 901 ) 81 901 IF( ios /= 0 ) CALL ctl_nam( ios, 'namsbc_fwb in reference namelist' ) 82 READ( numnam_cfg, namsbc_fwb, IOSTAT = ios, ERR = 902 ) 83 902 IF( ios > 0 ) CALL ctl_nam( ios, 'namsbc_fwb in configuration namelist' ) 84 IF(lwm) WRITE( numond, namsbc_fwb ) 77 85 IF(lwp) THEN 78 86 WRITE(numout,*) … … 80 88 WRITE(numout,*) '~~~~~~~' 81 89 IF( kn_fwb == 1 ) WRITE(numout,*) ' instantaneously set to zero' 82 IF( kn_fwb == 2 ) WRITE(numout,*) ' adjusted from previous year budget'90 IF( kn_fwb == 4 ) WRITE(numout,*) ' instantaneously set to zero with heat and salt flux correction (ISOMIP+)' 83 91 IF( kn_fwb == 3 ) WRITE(numout,*) ' fwf set to zero and spread out over erp area' 84 IF( kn_fwb == 4 ) WRITE(numout,*) ' instantaneously set to zero with heat and salt flux correction (ISOMIP+)' 92 IF( kn_fwb == 2 ) THEN 93 WRITE(numout,*) ' adjusted from previous year budget' 94 WRITE(numout,*) 95 WRITE(numout,*) ' Namelist namsbc_fwb' 96 WRITE(numout,*) ' Initial freshwater adjustment flux [kg/m2/s] = ', rn_fwb0 97 END IF 85 98 ENDIF 86 99 ! … … 105 118 ! 106 119 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 107 y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) +fwfisf_par(:,:) - snwice_fmass(:,:) ) )120 y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 108 121 CALL mpp_delay_sum( 'sbcfwb', 'fwb', y_fwfnow(:), z_fwfprv(:), kt == nitend - nn_fsbc + 1 ) 109 122 z_fwfprv(1) = z_fwfprv(1) / area … … 111 124 emp(:,:) = emp(:,:) - z_fwfprv(1) * tmask(:,:,1) 112 125 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 126 ! outputs 127 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) ) 128 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1) * tmask(:,:,1) ) 113 129 ENDIF 114 130 ! … … 116 132 ! 117 133 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 118 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) +fwfisf_par(:,:) - snwice_fmass(:,:) ) )134 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 119 135 ! 120 136 ! correction for ice sheet coupling testing (ie remove the excess through the surface) … … 131 147 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! use sst_m to avoid generation of any bouyancy fluxes 132 148 sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! use sss_m to avoid generation of any bouyancy fluxes 133 !qns(:,:) = qns(:,:) + zcoef * ( -1.9 ) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't want any bouyancy fluxes 134 !sfx(:,:) = sfx(:,:) + z_fwf * ( 33.8 ) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't want any bouyancy fluxes 135 !qns(:,:) = qns(:,:) + zcoef * ( -1.0 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 136 !sfx(:,:) = sfx(:,:) + z_fwf * ( 34.2 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 137 ENDIF 138 ! 139 CASE ( 2 ) !== fwf budget adjusted from the previous year ==! 140 ! 141 IF( kt == nit000 ) THEN ! initialisation 142 ! ! Read the corrective factor on precipitations (fwfold) 143 CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 144 READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 145 CLOSE( inum ) 146 fwfold = a_fwb ! current year freshwater budget correction 147 ! ! estimate from the previous year budget 149 ENDIF 150 ! 151 CASE ( 2 ) !== fw adjustment based on fw budget at the end of the previous year ==! 152 ! 153 IF( kt == nit000 ) THEN ! initialisation 154 ! ! set the fw adjustment (a_fwb) 155 IF ( ln_rstart .AND. iom_varid( numror, 'a_fwb', ldstop = .FALSE. ) > 0 ) THEN ! as read from restart file 156 IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' 157 CALL iom_get( numror, 'a_fwb', a_fwb ) 158 ELSE ! as specified in namelist 159 a_fwb = rn_fwb0 160 END IF 161 ! 148 162 IF(lwp)WRITE(numout,*) 149 IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear , ' freshwater budget correction = ', fwfold 150 IF(lwp)WRITE(numout,*)' year = ',iyear-1, ' freshwater budget read = ', a_fwb 151 IF(lwp)WRITE(numout,*)' year = ',iyear-2, ' freshwater budget read = ', a_fwb_b 163 IF(lwp)WRITE(numout,*)'sbc_fwb : initial freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 164 ! 152 165 ENDIF 153 ! ! Update fwfoldif new year start166 ! ! Update a_fwb if new year start 154 167 ikty = 365 * 86400 / rn_Dt !!bug use of 365 days leap year or 360d year !!!!!!! 155 168 IF( MOD( kt, ikty ) == 0 ) THEN 156 a_fwb_b = a_fwb! mean sea level taking into account the ice+snow169 ! mean sea level taking into account the ice+snow 157 170 ! sum over the global domain 158 171 a_fwb = glob_sum( 'sbcfwb', e1e2t(:,:) * ( ssh(:,:,Kmm) + snwice_mass(:,:) * r1_rho0 ) ) 159 172 a_fwb = a_fwb * 1.e+3 / ( area * rday * 365. ) ! convert in Kg/m3/s = mm/s 160 173 !!gm ! !!bug 365d year 161 fwfold = a_fwb ! current year freshwater budget correction162 ! ! estimate from the previous year budget163 174 ENDIF 164 175 ! 165 176 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN ! correct the freshwater fluxes 166 zcoef = fwfold* rcp167 emp(:,:) = emp(:,:) + fwfold* tmask(:,:,1)177 zcoef = a_fwb * rcp 178 emp(:,:) = emp(:,:) + a_fwb * tmask(:,:,1) 168 179 qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 169 ENDIF 170 ! 171 IF( kt == nitend .AND. lwm ) THEN ! save fwfold value in a file (only one required) 172 CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 173 WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb 174 CLOSE( inum ) 175 ENDIF 180 ! outputs 181 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) ) 182 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', -a_fwb * tmask(:,:,1) ) 183 ENDIF 184 ! Output restart information 185 IF( lrst_oce ) THEN 186 IF(lwp) WRITE(numout,*) 187 IF(lwp) WRITE(numout,*) 'sbc_fwb : writing FW-budget adjustment to ocean restart file at it = ', kt 188 IF(lwp) WRITE(numout,*) '~~~~' 189 CALL iom_rstput( kt, nitrst, numrow, 'a_fwb', a_fwb ) 190 END IF 191 ! 192 IF( kt == nitend .AND. lwp ) WRITE(numout,*) 'sbc_fwb : final freshwater-budget adjustment = ', a_fwb, 'kg/m2/s' 176 193 ! 177 194 CASE ( 3 ) !== global fwf set to zero and spread out over erp area ==! … … 184 201 ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 185 202 ! ! fwf global mean (excluding ocean to ice/snow exchanges) 186 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) +fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area203 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - fwfisf_cav(:,:) - fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area 187 204 ! 188 205 IF( z_fwf < 0._wp ) THEN ! spread out over >0 erp area to increase evaporation … … 211 228 qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:) ! account for change to the heat budget due to fw correction 212 229 erp(:,:) = erp(:,:) + zerp_cor(:,:) 230 ! outputs 231 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) ) 232 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) ) 213 233 ! 214 234 IF( lwp ) THEN ! control print -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/tradmp.F90
r13982 r15574 11 11 !! NEMO 1.0 ! 2002-08 (G. Madec, E. Durand) free form + modules 12 12 !! 3.2 ! 2009-08 (G. Madec, C. Talandier) DOCTOR norm for namelist parameter 13 !! 3.3 ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 13 !! 3.3 ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 14 14 !! 3.4 ! 2011-04 (G. Madec, C. Ethe) Merge of dtatem and dtasal + suppression of CPP keys 15 15 !! 3.6 ! 2015-06 (T. Graham) read restoring coefficient in a file … … 26 26 USE c1d ! 1D vertical configuration 27 27 USE trd_oce ! trends: ocean variables 28 USE trdtra ! trends manager: tracers 28 USE trdtra ! trends manager: tracers 29 29 USE zdf_oce ! ocean: vertical physics 30 30 USE phycst ! physical constants … … 53 53 !! * Substitutions 54 54 # include "do_loop_substitute.h90" 55 # include "domzgr_substitute.h90" 55 56 !!---------------------------------------------------------------------- 56 57 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 75 76 !!---------------------------------------------------------------------- 76 77 !! *** ROUTINE tra_dmp *** 77 !! 78 !! 78 79 !! ** Purpose : Compute the tracer trend due to a newtonian damping 79 80 !! of the tracer field towards given data field and add it to the 80 81 !! general tracer trends. 81 82 !! 82 !! ** Method : Newtonian damping towards t_dta and s_dta computed 83 !! ** Method : Newtonian damping towards t_dta and s_dta computed 83 84 !! and add to the general tracer trends: 84 85 !! ta = ta + resto * (t_dta - tb) … … 96 97 INTEGER :: ji, jj, jk, jn ! dummy loop indices 97 98 REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts) :: zts_dta 99 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t 98 100 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: ztrdts 99 101 !!---------------------------------------------------------------------- … … 101 103 IF( ln_timing ) CALL timing_start('tra_dmp') 102 104 ! 103 IF( l_trdtra ) THEN!* Save ta and sa trends104 ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) ) 105 ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) 105 IF( l_trdtra .OR. iom_use('hflx_dmp_cea') .OR. iom_use('sflx_dmp_cea') ) THEN !* Save ta and sa trends 106 ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) ) 107 ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) 106 108 ENDIF 107 109 ! !== input T-S data at kt ==! … … 140 142 END SELECT 141 143 ! 144 ! outputs (clem trunk) 145 DO jk = 1, jpk 146 ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 147 END DO 148 ! 149 IF( iom_use('hflx_dmp_cea') ) & 150 & CALL iom_put('hflx_dmp_cea', & 151 & SUM( ( pts(:,:,:,jp_tem,Krhs) - ztrdts(:,:,:,jp_tem) ) * ze3t(:,:,:), dim=3 ) * rcp * rho0 ) ! W/m2 152 IF( iom_use('sflx_dmp_cea') ) & 153 & CALL iom_put('sflx_dmp_cea', & 154 & SUM( ( pts(:,:,:,jp_sal,Krhs) - ztrdts(:,:,:,jp_sal) ) * ze3t(:,:,:), dim=3 ) * rho0 ) ! g/m2/s 155 ! 142 156 IF( l_trdtra ) THEN ! trend diagnostic 143 157 ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) - ztrdts(:,:,:,:) 144 158 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) ) 145 159 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) ) 146 DEALLOCATE( ztrdts ) 160 DEALLOCATE( ztrdts ) 147 161 ENDIF 148 162 ! ! Control print … … 158 172 !!---------------------------------------------------------------------- 159 173 !! *** ROUTINE tra_dmp_init *** 160 !! 161 !! ** Purpose : Initialization for the newtonian damping 174 !! 175 !! ** Purpose : Initialization for the newtonian damping 162 176 !! 163 177 !! ** Method : read the namtra_dmp namelist and check the parameters 164 178 !!---------------------------------------------------------------------- 165 INTEGER :: ios, imask ! local integers 179 INTEGER :: ios, imask ! local integers 166 180 ! 167 181 NAMELIST/namtra_dmp/ ln_tradmp, nn_zdmp, cn_resto -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namtile ! parameters of the tiling 54 !----------------------------------------------------------------------- 55 / 56 !----------------------------------------------------------------------- 53 57 &namtsd ! Temperature & Salinity Data (init/dmp) (default: OFF) 54 58 !----------------------------------------------------------------------- … … 64 68 / 65 69 !----------------------------------------------------------------------- 66 &namc1d ! 1D configuration options ( "key_c1d"default: PAPA station)67 !----------------------------------------------------------------------- 68 / 69 !----------------------------------------------------------------------- 70 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)71 !----------------------------------------------------------------------- 72 / 73 !----------------------------------------------------------------------- 74 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)70 &namc1d ! 1D configuration options (ln_c1d =T default: PAPA station) 71 !----------------------------------------------------------------------- 72 / 73 !----------------------------------------------------------------------- 74 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 75 !----------------------------------------------------------------------- 76 / 77 !----------------------------------------------------------------------- 78 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 75 79 !----------------------------------------------------------------------- 76 80 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP/MY_SRC/usrdef_nam.F90
r13286 r15574 41 41 CONTAINS 42 42 43 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)43 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 44 44 !!---------------------------------------------------------------------- 45 45 !! *** ROUTINE dom_nam *** … … 53 53 !! ** input : - namusr_def namelist found in namelist_cfg 54 54 !!---------------------------------------------------------------------- 55 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 56 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 57 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 58 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 55 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 56 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 57 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 58 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 59 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 60 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 59 61 ! 60 62 INTEGER :: ios ! Local integer … … 77 79 ! 78 80 ! ! Set the lateral boundary condition of the global domain 79 kperio = 0 ! ISOMIP configuration : close basin 81 ldIperio = .FALSE. ; ldJperio = .FALSE. ! ISOMIP configuration : closed domain 82 ldNFold = .FALSE. ; cdNFtype = '-' 80 83 ! 81 84 ! ! control print … … 98 101 WRITE(numout,*) ' jpkglo = ', kpk 99 102 WRITE(numout,*) ' ' 100 WRITE(numout,*) ' Lateral boundary condition of the global domain'101 WRITE(numout,*) ' ISOMIP : closed basin jperio = ', kperio102 103 ENDIF 103 104 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 41 41 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 42 42 ln_write_cfg = .false. ! (=T) create the domain configuration file 43 / 44 !----------------------------------------------------------------------- 45 &namtile ! parameters of the tiling 46 !----------------------------------------------------------------------- 43 47 / 44 48 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90
r13286 r15574 37 37 CONTAINS 38 38 39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE dom_nam *** … … 49 49 !! ** input : - namusr_def namelist found in namelist_cfg 50 50 !!---------------------------------------------------------------------- 51 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 55 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 56 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 55 57 ! 56 58 INTEGER :: ios ! Local integer … … 73 75 kpk = INT( 20. / rn_dz ) + 1 74 76 ! ! Set the lateral boundary condition of the global domain 75 kperio = 0 ! LOCK_EXCHANGE configuration : closed domain 77 ldIperio = .FALSE. ; ldJperio = .FALSE. ! LOCK_EXCHANGE configuration : closed domain 78 ldNFold = .FALSE. ; cdNFtype = '-' 76 79 ! 77 80 ! ! control print … … 88 91 WRITE(numout,*) ' jpkglo = ', kpk 89 92 WRITE(numout,*) ' ' 90 WRITE(numout,*) ' Lateral boundary condition of the global domain'91 WRITE(numout,*) ' closed jperio = ', kperio92 93 ENDIF 93 94 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90
r12377 r15574 84 84 ! 85 85 ! no ocean cavities : top ocean level is ONE, except over land 86 ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=086 ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 87 87 z2d(:,:) = 1._wp ! surface ocean is the 1st level 88 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin since jperio = 0 (see userdef_nam.F90)88 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin, see userdef_nam.F90 89 89 k_top(:,:) = NINT( z2d(:,:) ) 90 90 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/1_namelist_cfg
r14229 r15574 11 11 ln_sco = .false. ! s-coordinate 12 12 rn_dx = 1000. ! horizontal resolution [meters] 13 rn_dz = 20. ! vertical resolution [meters]13 rn_dz = 50. ! vertical resolution [meters] 14 14 / 15 15 ! … … 18 18 !----------------------------------------------------------------------- 19 19 ln_vert_remap = .true. ! use vertical remapping 20 ln_chk_bathy = .true. ! =T check the parent bathymetry21 20 / 22 21 !----------------------------------------------------------------------- … … 26 25 cn_exp = "OVF" ! experience name 27 26 nn_it000 = 1 ! first time step 28 nn_itend = 2040 ! here 16h of simulation (=5760 time-step) abort after 5802 for zps: pb of physics conditions27 nn_itend = 1530 ! here 16h of simulation (=5760 time-step) abort after 5802 for zps: pb of physics conditions 29 28 nn_istate = 0 ! output the initial state (1) or not (0) 30 29 nn_stock = 9999 ! frequency of creation of a restart file (modulo referenced to 1) … … 40 39 / 41 40 !----------------------------------------------------------------------- 41 &namtile ! parameters of the tiling 42 !----------------------------------------------------------------------- 43 / 44 !----------------------------------------------------------------------- 42 45 &namdom ! space and time domain (bathymetry, mesh, timestep) 43 46 !----------------------------------------------------------------------- 44 rn_Dt = 10. ! time step for the dynamics (and tracer if nn_acc=0)47 rn_Dt = 40. ! time step for the dynamics (and tracer if nn_acc=0) 45 48 rn_atfp = 0.1 ! asselin time filter parameter 46 49 ln_meshmask = .false. ! =T create a mesh file … … 150 153 ln_dynvor_mix = .false. ! mixed scheme 151 154 ln_dynvor_een = .false. ! energy & enstrophy scheme 152 nn_een_e3f = 0 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)153 155 / 154 156 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/AGRIF_FixedGrids.in
r13936 r15574 1 1 1 2 10 41 1 4 4 1 42 10 41 1 4 1 1 1 3 3 0 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/AGRIF/namelist_cfg
r14229 r15574 11 11 ln_sco = .false. ! s-coordinate 12 12 rn_dx = 1000. ! horizontal resolution [meters] 13 rn_dz = 20. ! vertical resolution [meters]13 rn_dz = 50. ! vertical resolution [meters] 14 14 / 15 15 ! … … 20 20 cn_exp = "OVF" ! experience name 21 21 nn_it000 = 1 ! first time step 22 nn_itend = 2040 ! here 16h of simulation (=5760 time-step) abort after 5802 for zps: pb of physics conditions22 nn_itend = 1530 ! here 16h of simulation (=5760 time-step) abort after 5802 for zps: pb of physics conditions 23 23 nn_istate = 0 ! output the initial state (1) or not (0) 24 24 nn_stock = 9999 ! frequency of creation of a restart file (modulo referenced to 1) … … 32 32 cn_domcfg = "OVF_domcfg" ! domain configuration filename 33 33 ! 34 / 35 !----------------------------------------------------------------------- 36 &namtile ! parameters of the tiling 37 !----------------------------------------------------------------------- 34 38 / 35 39 !----------------------------------------------------------------------- … … 144 148 ln_dynvor_mix = .false. ! mixed scheme 145 149 ln_dynvor_een = .false. ! energy & enstrophy scheme 146 nn_een_e3f = 0 ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)147 150 / 148 151 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_flux_ubs_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 41 41 !----------------------------------------------------------------------- 42 42 &namcfg ! parameters of the configuration 43 !----------------------------------------------------------------------- 44 / 45 !----------------------------------------------------------------------- 46 &namtile ! parameters of the tiling 43 47 !----------------------------------------------------------------------- 44 48 / -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/MY_SRC/usrdef_nam.F90
r13286 r15574 38 38 CONTAINS 39 39 40 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)40 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 41 41 !!---------------------------------------------------------------------- 42 42 !! *** ROUTINE dom_nam *** … … 50 50 !! ** input : - namusr_def namelist found in namelist_cfg 51 51 !!---------------------------------------------------------------------- 52 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 53 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 52 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 53 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 56 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 57 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 56 58 ! 57 59 INTEGER :: ios ! Local integer … … 88 90 WRITE(numout,*) ' Nj0glo = ', kpj 89 91 WRITE(numout,*) ' jpkglo = ', kpk 92 WRITE(numout,*) ' ' 90 93 ! 91 94 ! ! Set the lateral boundary condition of the global domain 92 kperio = 0 ! OVERFLOW configuration : close basin 93 ! 94 WRITE(numout,*) ' ' 95 WRITE(numout,*) ' Lateral boundary condition of the global domain' 96 WRITE(numout,*) ' OVERFLOW : closed basin jperio = ', kperio 95 ldIperio = .FALSE. ; ldJperio = .FALSE. ! OVERFLOW configuration : closed domain 96 ldNFold = .FALSE. ; cdNFtype = '-' 97 97 ! 98 98 END SUBROUTINE usr_def_nam -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90
r14053 r15574 90 90 ! 91 91 ! at u-point: averaging zht 92 DO ji = 1, jpim193 zhu(ji, :) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) )94 END DO92 DO_2D( 0, 0, 0, 0 ) 93 zhu(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji+1,jj) ) 94 END_2D 95 95 CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1. ) ! boundary condition: this mask the surrouding grid-points 96 96 ! ! ==>>> set by hand non-zero value on first/last columns & rows … … 110 110 ! 111 111 ! no ocean cavities : top ocean level is ONE, except over land 112 ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0112 ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 113 113 z2d(:,:) = 1._wp ! surface ocean is the 1st level 114 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin since jperio = 0 (see userdef_nam.F90)114 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin, see userdef_nam.F90 115 115 k_top(:,:) = NINT( z2d(:,:) ) 116 116 ! … … 184 184 pe3vw(:,:,jk) = pe3w_1d (jk) 185 185 END DO 186 DO_2D( 1, 1, 1, 1)186 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 187 187 ik = k_bot(ji,jj) 188 188 pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) ) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/README.rst
r14226 r15574 206 206 :labelprefix: T 207 207 208 ICE_RHEO 209 -------- 210 | 211 212 BENCH 213 ----- 214 | Benchmark configuration. Allow to run any configuration (including ORCA type or BDY) with idealized grid 215 and initial state so it does not need any input file other than the namelists. 216 As usual, all configuration changes can be done through the namelist. 217 We provide 3 example of namelist_cfg to mimic ORCA1, OR025 or ORCA12 configurations. 218 By default do not produce any output file. An extensive description of BENCH will be abailable in 219 Irrmann et al. 2021. 220 208 221 CPL_OASIS 209 222 --------- 210 223 | This test case checks the OASIS interface in OCE/SBC, allowing to set up 211 a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 224 a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 225 226 DIA_GPU 227 --------- 228 | This is a demonstrator of diagnostic DIAHSB ported to GPU using CUDA Fortran. 229 Memory communications between host and device are asynchronous given the device has that capability. 230 This experiment is target for ORCA2_ICE_PISCES 212 231 213 232 TSUNAMI 214 233 --------- 215 234 | just use dynspg_ts to simulate the propagation of an ssh anomaly (cosinus) in a box configuration 216 with flat bottom and jpk=2 235 with flat bottom and jpk=2. 217 236 218 237 DONUT 219 238 ----- 220 | Donut shaped configuration to test MPI decomposition with bdy 239 | Donut shaped configuration to test MPI decomposition with bdy. 240 241 C1D_ASICS 242 --------- 243 | 244 245 DOME 246 ---- 247 | 248 249 ICB 250 ---- 251 | ICB is a very idealized configuration used to test and debug the icb module. 252 The configuration is box with a shallow shelf (40m) on the east and west part of the domain 253 with a deep central trough (> 100m). 254 ICB are generating using the test capability of the icb model along a E-W line (this can easily be tuned). 255 256 STATION_ASF 257 ----------- 258 | this demonstration test case can be used to perform a sanity test of the SBCBLK interface of 259 NEMO. It will test all the bulk-parameterization algorithms using an idealized 260 forcing that includes a wide range of *SSX / surface atmospheric state* 261 conditions to detect potential error / inconsistencies. Both a short report and 262 boolean output: *passed* or *failed* is provided as an output. 263 264 SWG 265 --- 266 | Square bassin blown with an analytical wind. Vertical structure allows only one mode 267 associated with reduced gravity to develop. This configuration is based on Adcroft & Marshall 1998. 268 Also run with RK3 time stepping. -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-an05_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-cstc_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-lg15_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce+ice/namelist_ecmwf-lu12_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_andreas_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_coare3p6_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_ecmwf_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/ERA5/oce/namelist_ncar_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_andreas_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 47 47 / 48 48 !----------------------------------------------------------------------- 49 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)49 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 50 50 !----------------------------------------------------------------------- 51 51 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_coare3p6_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 47 47 / 48 48 !----------------------------------------------------------------------- 49 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)49 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 50 50 !----------------------------------------------------------------------- 51 51 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ecmwf_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 47 47 / 48 48 !----------------------------------------------------------------------- 49 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)49 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 50 50 !----------------------------------------------------------------------- 51 51 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/EXPREF/PAPA/oce/namelist_ncar_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 47 47 / 48 48 !----------------------------------------------------------------------- 49 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)49 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 50 50 !----------------------------------------------------------------------- 51 51 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 53 53 / 54 54 !----------------------------------------------------------------------- 55 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)55 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 56 56 !----------------------------------------------------------------------- 57 57 ln_dyndmp = .false. ! add a damping term (T) or not (F) 58 58 / 59 59 !----------------------------------------------------------------------- 60 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)60 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 61 61 !----------------------------------------------------------------------- 62 62 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/icesbc.F90
r14072 r15574 91 91 vtau_ice(ji,jj) = vtau_ice(ji,jj) * xcplmask(ji,jj,0) + zvtau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) ) 92 92 END_2D 93 CALL lbc_lnk _multi( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp )93 CALL lbc_lnk( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 94 94 ENDIF 95 95 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/nemogcm.F90
r14239 r15574 243 243 ! 244 244 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 245 CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio)245 CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 246 246 ELSE ! user-defined namelist 247 CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio)247 CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 248 248 ENDIF 249 249 ! … … 273 273 CALL phy_cst ! Physical constants 274 274 CALL eos_init ! Equation of state 275 IF( l k_c1d ) CALL c1d_init ! 1D column configuration275 IF( ln_c1d ) CALL c1d_init ! 1D column configuration 276 276 CALL dom_init( Nbb, Nnn, Naa ) ! Domain 277 277 IF( sn_cfctl%l_prtctl ) & -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/sbcssm.F90
r14072 r15574 12 12 !!---------------------------------------------------------------------- 13 13 USE oce ! ocean dynamics and tracers variables 14 USE c1d ! 1D configuration: l k_c1d14 USE c1d ! 1D configuration: ln_c1d 15 15 USE dom_oce ! ocean domain: variables 16 16 USE sbc_oce ! surface module: variables -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/stpctl.F90
r14318 r15574 113 113 ! !== done by all processes at every time step ==! 114 114 ! 115 llmsk( 1:Nis1,:) = .FALSE.! exclude halos from the checked region116 llmsk(Nie 1:jpi,:) = .FALSE.117 llmsk(:, 1:Njs1) = .FALSE.118 llmsk(:,Nje 1:jpj) = .FALSE.115 llmsk( 1:nn_hls,:) = .FALSE. ! exclude halos from the checked region 116 llmsk(Nie0+1: jpi,:) = .FALSE. 117 llmsk(:, 1:nn_hls) = .FALSE. 118 llmsk(:,Nje0+1: jpj) = .FALSE. 119 119 ! 120 120 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
r14072 r15574 37 37 CONTAINS 38 38 39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE dom_nam *** … … 49 49 !! ** input : - namusr_def namelist found in namelist_cfg 50 50 !!---------------------------------------------------------------------- 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 55 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 56 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 55 57 ! 56 58 INTEGER :: ios ! Local integer … … 73 75 ! 74 76 ! ! Set the lateral boundary condition of the global domain 75 kperio = 7 ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 77 ldIperio = .TRUE. ; ldJperio = .true. ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 78 ldNFold = .FALSE. ; cdNFtype = '-' 76 79 ! 77 80 ! ! control print … … 85 88 WRITE(numout,*) ' number of model levels kpk = ', kpk 86 89 WRITE(numout,*) ' ' 87 WRITE(numout,*) ' Lateral b.c. of the domain set to jperio = ', kperio88 90 ENDIF 89 91 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_andreas_cfg
r14229 r15574 16 16 !! namtsd data: temperature & salinity (default: OFF) 17 17 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 18 !! namc1d 1D configuration options ( "key_c1d")19 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")20 !! namc1d_uvd 1D data (currents) ( "key_c1d")18 !! namc1d 1D configuration options (ln_c1d =T) 19 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 20 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 21 21 !!====================================================================== 22 22 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)53 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 54 54 !----------------------------------------------------------------------- 55 55 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 57 57 / 58 58 !----------------------------------------------------------------------- 59 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)59 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 60 60 !----------------------------------------------------------------------- 61 61 ln_dyndmp = .false. ! add a damping term (T) or not (F) 62 62 / 63 63 !----------------------------------------------------------------------- 64 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)64 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 65 65 !----------------------------------------------------------------------- 66 66 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_coare3p0_cfg
r14229 r15574 16 16 !! namtsd data: temperature & salinity (default: OFF) 17 17 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 18 !! namc1d 1D configuration options ( "key_c1d")19 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")20 !! namc1d_uvd 1D data (currents) ( "key_c1d")18 !! namc1d 1D configuration options (ln_c1d =T) 19 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 20 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 21 21 !!====================================================================== 22 22 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)53 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 54 54 !----------------------------------------------------------------------- 55 55 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 57 57 / 58 58 !----------------------------------------------------------------------- 59 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)59 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 60 60 !----------------------------------------------------------------------- 61 61 ln_dyndmp = .false. ! add a damping term (T) or not (F) 62 62 / 63 63 !----------------------------------------------------------------------- 64 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)64 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 65 65 !----------------------------------------------------------------------- 66 66 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_coare3p6_cfg
r14229 r15574 16 16 !! namtsd data: temperature & salinity (default: OFF) 17 17 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 18 !! namc1d 1D configuration options ( "key_c1d")19 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")20 !! namc1d_uvd 1D data (currents) ( "key_c1d")18 !! namc1d 1D configuration options (ln_c1d =T) 19 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 20 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 21 21 !!====================================================================== 22 22 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)53 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 54 54 !----------------------------------------------------------------------- 55 55 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 57 57 / 58 58 !----------------------------------------------------------------------- 59 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)59 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 60 60 !----------------------------------------------------------------------- 61 61 ln_dyndmp = .false. ! add a damping term (T) or not (F) 62 62 / 63 63 !----------------------------------------------------------------------- 64 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)64 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 65 65 !----------------------------------------------------------------------- 66 66 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_ecmwf_cfg
r14229 r15574 16 16 !! namtsd data: temperature & salinity (default: OFF) 17 17 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 18 !! namc1d 1D configuration options ( "key_c1d")19 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")20 !! namc1d_uvd 1D data (currents) ( "key_c1d")18 !! namc1d 1D configuration options (ln_c1d =T) 19 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 20 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 21 21 !!====================================================================== 22 22 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)53 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 54 54 !----------------------------------------------------------------------- 55 55 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 57 57 / 58 58 !----------------------------------------------------------------------- 59 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)59 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 60 60 !----------------------------------------------------------------------- 61 61 ln_dyndmp = .false. ! add a damping term (T) or not (F) 62 62 / 63 63 !----------------------------------------------------------------------- 64 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)64 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 65 65 !----------------------------------------------------------------------- 66 66 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/SANITY_CHECK/IDEALIZED/oce/namelist_ncar_cfg
r14229 r15574 16 16 !! namtsd data: temperature & salinity (default: OFF) 17 17 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 18 !! namc1d 1D configuration options ( "key_c1d")19 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")20 !! namc1d_uvd 1D data (currents) ( "key_c1d")18 !! namc1d 1D configuration options (ln_c1d =T) 19 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 20 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 21 21 !!====================================================================== 22 22 ! … … 51 51 / 52 52 !----------------------------------------------------------------------- 53 &namc1d ! 1D configuration options / STATION_ASF ( "key_c1d"default: PAPA station)53 &namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station) 54 54 !----------------------------------------------------------------------- 55 55 rn_lat1d = 50.1 ! Column latitude [PAPA station] … … 57 57 / 58 58 !----------------------------------------------------------------------- 59 &namc1d_dyndmp ! U & V newtonian damping ( "key_c1d"default: OFF)59 &namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF) 60 60 !----------------------------------------------------------------------- 61 61 ln_dyndmp = .false. ! add a damping term (T) or not (F) 62 62 / 63 63 !----------------------------------------------------------------------- 64 &namc1d_uvd ! data: U & V currents ( "key_c1d"default: OFF)64 &namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF) 65 65 !----------------------------------------------------------------------- 66 66 ! ! =T read U-V fields for: -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/STATION_ASF/cpp_STATION_ASF.fcm
r14239 r15574 1 bld::tool::fppkeys key_si3 key_ c1d key_qco key_xios1 bld::tool::fppkeys key_si3 key_qco key_xios -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 32 32 !----------------------------------------------------------------------- 33 33 ln_read_cfg = .false. ! (=F) user defined configuration (F => create/check namusr_def) 34 / 35 !----------------------------------------------------------------------- 36 &namtile ! parameters of the tiling 37 !----------------------------------------------------------------------- 34 38 / 35 39 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_hgr.F90
r13752 r15574 113 113 DO jj = 1, jpj 114 114 DO ji = 1, jpi 115 zim1 = REAL( ji + nimpp - 1 ) ; zim05 = REAL( ji + nimpp - 1 ) - 0.5116 zjm1 = REAL( jj + njmpp - 1 ) ; zjm05 = REAL( jj + njmpp - 1 ) - 0.5115 zim1 = REAL( ji + nimpp - nn_hls ) ; zim05 = REAL( ji + nimpp - nn_hls ) - 0.5 116 zjm1 = REAL( jj + njmpp - nn_hls ) ; zjm05 = REAL( jj + njmpp - nn_hls ) - 0.5 117 117 ! 118 118 !glamt(i,j) position (meters) at T-point -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_nam.F90
r13752 r15574 57 57 CONTAINS 58 58 59 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)59 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 60 60 !!---------------------------------------------------------------------- 61 61 !! *** ROUTINE dom_nam *** … … 69 69 !! ** input : - namusr_def namelist found in namelist_cfg 70 70 !!---------------------------------------------------------------------- 71 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 72 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 73 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 74 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 71 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 72 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 73 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 74 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 75 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 76 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 75 77 ! 76 78 INTEGER :: ios ! Local integer … … 110 112 kpk = jpkglo 111 113 ! ! Set the lateral boundary condition of the global domain 112 kperio = 0 ! SWG configuration : closed domain 114 ldIperio = .FALSE. ; ldJperio = .FALSE. ! SWG configuration : closed domain 115 ldNFold = .FALSE. ; cdNFtype = '-' 113 116 ! 114 117 # if defined key_bvp … … 131 134 WRITE(numout,*) ' number of model levels jpkglo = ', kpk 132 135 WRITE(numout,*) ' ' 133 WRITE(numout,*) ' Lateral b.c. of the global domain set to closed jperio = ', kperio134 136 ENDIF 135 137 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_sbc.F90
r13752 r15574 32 32 PUBLIC usrdef_sbc_ice_flx ! routine called by icestp.F90 for ice thermo 33 33 34 !! * Substitutions 35 # include "do_loop_substitute.h90" 34 36 !!---------------------------------------------------------------------- 35 37 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 70 72 sfx (:,:) = 0._wp 71 73 qns (:,:) = 0._wp 74 qsr (:,:) = 0._wp 72 75 73 76 ! ---------------------------- ! … … 84 87 ztauv = - REAL( rn_tau, wp ) * SIN( rn_theta * rad ) ! N.m-2 85 88 86 DO jj = 1, jpj 87 DO ji = 1, jpi 88 ! length of the domain : 2000km x 2000km 89 utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 90 vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 91 END DO 92 END DO 93 89 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 90 ! length of the domain : 2000km x 2000km 91 utau(ji,jj) = - ztauu * COS( rpi * gphiu(ji,jj) / 2000000._wp) 92 vtau(ji,jj) = - ztauv * COS( rpi * gphiv(ji,jj) / 2000000._wp) 93 END_2D 94 94 95 ! module of wind stress and wind speed at T-point 95 96 zcoef = 1. / ( zrhoa * zcdrag ) 96 DO jj = 2, jpjm1 97 DO ji = 2, jpim1 98 ztx = utau(ji-1,jj ) + utau(ji,jj) 99 zty = vtau(ji ,jj-1) + vtau(ji,jj) 100 zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 101 taum(ji,jj) = zmod 102 wndm(ji,jj) = SQRT( zmod * zcoef ) 103 END DO 104 END DO 105 106 CALL lbc_lnk_multi( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 97 DO_2D( 0, 0, 0, 0 ) 98 ztx = utau(ji-1,jj ) + utau(ji,jj) 99 zty = vtau(ji ,jj-1) + vtau(ji,jj) 100 zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 101 taum(ji,jj) = zmod 102 wndm(ji,jj) = SQRT( zmod * zcoef ) 103 END_2D 104 CALL lbc_lnk( 'usrdef_sbc', taum(:,:), 'T', 1. , wndm(:,:), 'T', 1. ) 107 105 ! 108 106 END SUBROUTINE usrdef_sbc_oce -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/SWG/MY_SRC/usrdef_zgr.F90
r14204 r15574 31 31 PUBLIC usr_def_zgr ! called by domzgr.F90 32 32 33 !! * Substitutions 34 # include "do_loop_substitute.h90" 33 35 !!---------------------------------------------------------------------- 34 36 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 190 192 z2d(:,:) = REAL( jpkm1 , wp ) ! flat bottom 191 193 ! 192 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (here jperio=0 ==>> closed) 193 ! 194 ! 194 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (closed boundaries) 195 ! 195 196 zylim0 = 10000._wp ! +10km 196 197 zylim1 = 2010000._wp ! 2010km … … 198 199 zxlim1 = 2010000._wp ! 2010km 199 200 ! 200 DO jj = 1, jpj 201 DO ji = 1, jpi 201 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 202 202 ! if T point in the 2000 km x 2000 km domain 203 203 ! IF ( gphit(ji,jj) > zylim0 .AND. gphit(ji,jj) < zylim1 .AND. & … … 206 206 IF ( gphiv(ji,jj) > zylim0 .AND. gphiv(ji,jj) < zylim1 .AND. & 207 207 & glamu(ji,jj) > zxlim0 .AND. glamu(ji,jj) < zxlim1 ) THEN 208 k_top(ji,jj) = 1 ! = ocean209 k_bot(ji,jj) = NINT( z2d(ji,jj) )208 k_top(ji,jj) = 1 ! = ocean 209 k_bot(ji,jj) = NINT( z2d(ji,jj) ) 210 210 ELSE 211 k_top(ji,jj) = 0 ! = land212 k_bot(ji,jj) = 0211 k_top(ji,jj) = 0 ! = land 212 k_bot(ji,jj) = 0 213 213 END IF 214 END DO 215 END DO 214 END_2D 216 215 ! mask the lonely corners 217 DO jj = 2, jpjm1 218 DO ji = 2, jpim1 216 DO_2D( 0, 0, 0, 0 ) 219 217 zcoeff = k_top(ji+1,jj) + k_top(ji,jj+1) & 220 218 + k_top(ji-1,jj) + k_top(ji,jj-1) … … 223 221 k_bot(ji,jj) = 0 224 222 END IF 225 END DO 226 END DO 227 ! 223 END_2D 228 224 ! 229 225 END SUBROUTINE zgr_msk_top_bot -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/EXPREF/namelist_cfg
r14297 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration optgions ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration optgions (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 29 29 nn_fcase = 0 ! Coriolis frequency(f) computation (0:f0, 1:Beta plan, 2:real) 30 30 rn_ppgphi0 = 38.5 ! Reference latitude [degrees] 31 nn_perio = 7 31 ln_Iperio = .true. ! i-periodicity 32 ln_Jperio = .true. ! j-periodicity 33 / 34 !----------------------------------------------------------------------- 35 &namtile ! parameters of the tiling 36 !----------------------------------------------------------------------- 32 37 / 33 38 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_hgr.F90
r14225 r15574 64 64 ! 65 65 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zphi0, zlam0, zbeta, zf0 66 INTEGER :: ii0, ij0 ! dummy loop indices 67 REAL(wp) :: zbeta, zf0 67 68 REAL(wp) :: zti, ztj ! local scalars 68 69 !!------------------------------------------------------------------------------- … … 77 78 ! Position coordinates (in kilometers) 78 79 ! ========== 79 zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx80 zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy80 ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 81 ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 81 82 82 83 #if defined key_agrif 83 84 ! ! let lower left longitude and latitude from parent 84 85 IF (.NOT.Agrif_root()) THEN 85 zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 86 &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 87 zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 88 &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 86 to be coded... 89 87 ENDIF 90 88 #endif 91 89 92 90 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 93 zti = REAL( mig0(ji) , wp ) - 0.5_wp ! start at i=0.5in the global grid without halos94 ztj = REAL( mjg0(jj) , wp ) - 0.5_wp ! start at j=0.5in the global grid without halos91 zti = REAL( mig0(ji)-ii0, wp ) ! =0 at i=ii0 in the global grid without halos 92 ztj = REAL( mjg0(jj)-ij0, wp ) ! =0 at i=ij0 in the global grid without halos 95 93 96 plamt(ji,jj) = zlam0 +rn_dx * zti97 plamu(ji,jj) = zlam0 +rn_dx * ( zti + 0.5_wp )94 plamt(ji,jj) = rn_dx * zti 95 plamu(ji,jj) = rn_dx * ( zti + 0.5_wp ) 98 96 plamv(ji,jj) = plamt(ji,jj) 99 97 plamf(ji,jj) = plamu(ji,jj) 100 98 101 pphit(ji,jj) = zphi0 +rn_dy * ztj102 pphiv(ji,jj) = zphi0 +rn_dy * ( ztj + 0.5_wp )99 pphit(ji,jj) = rn_dy * ztj 100 pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp ) 103 101 pphiu(ji,jj) = pphit(ji,jj) 104 102 pphif(ji,jj) = pphiv(ji,jj) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_nam.F90
r14297 r15574 37 37 INTEGER , PUBLIC :: nn_fcase = 1 ! F computation (0:f0, 1:Beta, 2:real) 38 38 REAL(wp), PUBLIC :: rn_ppgphi0 = 38.5 ! reference latitude for beta-plane 39 INTEGER , PUBLIC :: nn_perio = 0 ! periodicity of the channel (0=closed, 1=E-W)40 39 41 40 !!---------------------------------------------------------------------- … … 46 45 CONTAINS 47 46 48 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)47 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 49 48 !!---------------------------------------------------------------------- 50 49 !! *** ROUTINE dom_nam *** … … 58 57 !! ** input : - namusr_def namelist found in namelist_cfg 59 58 !!---------------------------------------------------------------------- 60 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 61 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 62 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 63 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 59 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 60 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 61 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 62 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 63 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 64 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 64 65 ! 65 66 INTEGER :: ios ! Local integer 67 LOGICAL :: ln_Iperio, ln_Jperio 66 68 !! 67 69 NAMELIST/namusr_def/ rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_0xratio, rn_0yratio & 68 & , nn_fcase, rn_ppgphi0, nn_perio70 & , nn_fcase, rn_ppgphi0, ln_Iperio, ln_Jperio 69 71 !!---------------------------------------------------------------------- 70 72 ! … … 85 87 #endif 86 88 ! 87 IF(lwm) WRITE( numond, namusr_def )88 !89 89 cd_cfg = 'TSUNAMI' ! name & resolution (not used) 90 90 kk_cfg = INT( rn_dx ) … … 92 92 IF( Agrif_Root() ) THEN ! Global Domain size: TSUNAMI global domain is 1800 km x 1800 Km x 5000 m 93 93 kpi = NINT( rn_domszx / rn_dx ) + 1 94 kpj = NINT( rn_domszy / rn_dy ) + 394 kpj = NINT( rn_domszy / rn_dy ) + 1 95 95 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 96 kpi = nbcellsx + nbghostcells_x + nbghostcells_x+ 296 kpi = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 97 97 kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 98 98 ENDIF 99 99 kpk = 2 100 ! ! Set the lateral boundary condition of the global domain 101 kperio = 1 ! TSUNAMI configuration : closed basin 102 ! ! control print 100 ! ! Set the lateral boundary condition of the global domain 101 ! 102 ldIperio = ln_Iperio ; ldJperio = ln_Jperio 103 ldNFold = .FALSE. ; cdNFtype = '-' 104 ! 105 ! ! control print 103 106 IF(lwp) THEN 104 107 WRITE(numout,*) ' ' … … 115 118 WRITE(numout,*) ' F computation nn_fcase = ', nn_fcase 116 119 WRITE(numout,*) ' Reference latitude rn_ppgphi0 = ', rn_ppgphi0 117 WRITE(numout,*) ' Periodicity of the basin nn_perio = ', nn_perio120 WRITE(numout,*) ' ' 118 121 ENDIF 119 ! ! Set the lateral boundary condition of the global domain120 kperio = nn_perio ! TSUNAMI configuration : closed basin121 122 ! 122 123 END SUBROUTINE usr_def_nam -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/TSUNAMI/MY_SRC/usrdef_sbc.F90
r14225 r15574 3 3 !! *** MODULE usrdef_sbc *** 4 4 !! 5 !! === CANALconfiguration ===5 !! === TSUNAMI configuration === 6 6 !! 7 7 !! User defined : surface forcing of a user configuration … … 44 44 !! condition, i.e. the momentum, heat and freshwater fluxes. 45 45 !! 46 !! ** Method : all 0 fields, for CANALcase46 !! ** Method : all 0 fields, for TSUNAMI case 47 47 !! CAUTION : never mask the surface stress field ! 48 48 !! … … 57 57 IF( kt == nit000 ) THEN 58 58 ! 59 IF(lwp) WRITE(numout,*)' usr_sbc : EW_CANALcase: surface forcing'59 IF(lwp) WRITE(numout,*)' usr_sbc : TSUNAMI case: surface forcing' 60 60 IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~ vtau = taum = wndm = qns = qsr = emp = sfx = 0' 61 61 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/1_namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 45 45 !----------------------------------------------------------------------- 46 46 &namcfg ! parameters of the configuration (default: user defined GYRE) 47 !----------------------------------------------------------------------- 48 / 49 !----------------------------------------------------------------------- 50 &namtile ! parameters of the tiling 47 51 !----------------------------------------------------------------------- 48 52 / -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/AGRIF_FixedGrids.in
r9787 r15574 1 1 1 2 19 38 19 383 3 32 22 41 22 41 3 3 3 3 3 0 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 45 45 !----------------------------------------------------------------------- 46 46 &namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg) 47 !----------------------------------------------------------------------- 48 / 49 !----------------------------------------------------------------------- 50 &namtile ! parameters of the tiling 47 51 !----------------------------------------------------------------------- 48 52 / -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_hgr.F90
r14799 r15574 23 23 IMPLICIT NONE 24 24 PRIVATE 25 26 REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 25 27 26 28 PUBLIC usr_def_hgr ! called by domhgr.F90 … … 64 66 ! 65 67 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: z phi0, zlam0, zbeta, zf068 REAL(wp) :: zbeta, zf0 67 69 REAL(wp) :: zti, ztj ! local scalars 68 70 !!------------------------------------------------------------------------------- … … 77 79 ! Position coordinates (in kilometers) 78 80 ! ========== 79 #if defined key_agrif 80 IF( Agrif_Root() ) THEN81 #endif 82 zlam0 = -REAL((Ni0glo-1)/2, wp)* 1.e-3 * rn_dx83 zphi0 = -REAL((Nj0glo-1)/2, wp)* 1.e-3 * rn_dy81 ! offset is given at first f-point, i.e. at (i,j) = (nn_hls+1, nn_hls+1) 82 ! Here we assume the grid is centred around a T-point at the middle of 83 ! of the domain (hence domain size is odd) 84 roffsetx = (-REAL(Ni0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dx 85 roffsety = (-REAL(Nj0glo-1, wp) + 1._wp) * 0.5 * 1.e-3 * rn_dy 84 86 #if defined key_agrif 85 ELSE 86 ! ! let lower left longitude and latitude from parent 87 zlam0 = ( 0.5_wp - REAL(Agrif_Parent(Ni0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx & 88 & + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 89 zphi0 = ( 0.5_wp - REAL(Agrif_Parent(Nj0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy & 90 & + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 91 ENDIF 92 #endif 87 IF( .NOT.Agrif_Root() ) THEN 88 ! deduce offset from parent: 89 roffsetx = Agrif_Parent(roffsetx) & 90 & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 91 roffsety = Agrif_Parent(roffsety) & 92 & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 93 ENDIF 94 #endif 95 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 96 zti = REAL( mig0(ji)-1, wp ) ! start at i=0 in the global grid without halos 97 ztj = REAL( mjg0(jj)-1, wp ) ! start at j=0 in the global grid without halos 93 98 94 DO_2D( nn_hls , nn_hls, nn_hls, nn_hls ) 95 zti = REAL( mig0(ji)-1, wp ) ! start at i=0.5 in the global grid without halos 96 ztj = REAL( mjg0(jj)-1, wp ) ! start at j=0.5 in the global grid without halos 97 98 plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti 99 plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 99 plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 100 plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 * zti 100 101 plamv(ji,jj) = plamt(ji,jj) 101 102 plamf(ji,jj) = plamu(ji,jj) 102 103 103 pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj104 pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * ( ztj + 0.5_wp )104 pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 105 pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 * ztj 105 106 pphiu(ji,jj) = pphit(ji,jj) 106 107 pphif(ji,jj) = pphiv(ji,jj) -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_istate.F90
r14133 r15574 76 76 ! 77 77 ! temperature: 78 DO_2D( 1, 1, 1, 1)78 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 79 79 zx = glamt(ji,jj) * 1.e3 80 80 zy = gphit(ji,jj) * 1.e3 … … 123 123 END_2D 124 124 ! 125 CALL lbc_lnk _multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. )125 CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 126 126 ! 127 127 END SUBROUTINE usr_def_istate … … 160 160 ! Sea level: 161 161 za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 162 DO_2D( 1, 1, 1, 1)162 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 163 163 zx = glamt(ji,jj) * 1.e3 164 164 zy = gphit(ji,jj) * 1.e3 -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_nam.F90
r14086 r15574 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 54 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 56 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 57 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 58 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 59 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 58 60 ! 59 61 INTEGER :: ios ! Local integer 62 INTEGER :: ighost_n, ighost_s, ighost_w, ighost_e 60 63 REAL(wp):: zlx, zly, zh ! Local scalars 61 64 !! … … 81 84 kk_cfg = nINT( rn_dx ) 82 85 ! 86 #if defined key_agrif 83 87 IF( Agrif_Root() ) THEN ! Global Domain size: VORTEX global domain is 1800 km x 1800 Km x 5000 m 88 #endif 84 89 kpi = NINT( 1800.e3 / rn_dx ) + 3 85 90 kpj = NINT( 1800.e3 / rn_dy ) + 3 91 #if defined key_agrif 86 92 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 87 kpi = nbcellsx + 2 * ( nbghostcells + 1 ) 88 kpj = nbcellsy + 2 * ( nbghostcells + 1 ) 89 !!$ kpi = nbcellsx + nbghostcells_x + nbghostcells_x + 2 90 !!$ kpj = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 93 ! At this stage, child ghosts have not been set 94 ighost_w = nbghostcells 95 ighost_e = nbghostcells 96 ighost_s = nbghostcells 97 ighost_n = nbghostcells 98 99 ! In case one sets zoom boundaries over domain edges: 100 IF ( Agrif_Ix() == 2 - Agrif_Parent(nbghostcells_x_w) ) ighost_w = 1 101 IF ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) - Agrif_Parent(nbghostcells_x_w) ) ighost_e = 1 102 IF ( Agrif_Iy() == 2 - Agrif_Parent(nbghostcells_y_s) ) ighost_s = 1 103 IF ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) - Agrif_Parent(nbghostcells_y_s) ) ighost_n = 1 104 ! kpi = nbcellsx + 2 * ( nbghostcells + 1 ) 105 ! kpj = nbcellsy + 2 * ( nbghostcells + 1 ) 106 kpi = nbcellsx + ighost_w + ighost_e 107 kpj = nbcellsy + ighost_s + ighost_n 91 108 ENDIF 109 #endif 92 110 kpk = NINT( 5000._wp / rn_dz ) + 1 93 111 ! … … 96 114 zh = (kpk-1)*rn_dz 97 115 ! ! Set the lateral boundary condition of the global domain 98 kperio = 0 ! VORTEX configuration : closed basin 116 ldIperio = .FALSE. ; ldJperio = .FALSE. ! VORTEX configuration : closed domain 117 ldNFold = .FALSE. ; cdNFtype = '-' 118 ! 99 119 ! ! control print 100 120 IF(lwp) THEN … … 115 135 WRITE(numout,*) ' Reference latitude rn_ppgphi0 = ', rn_ppgphi0 116 136 WRITE(numout,*) ' ' 117 WRITE(numout,*) ' Lateral boundary condition of the global domain'118 WRITE(numout,*) ' VORTEX : closed basin jperio = ', kperio119 137 ENDIF 120 138 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/VORTEX/MY_SRC/usrdef_zgr.F90
r12740 r15574 190 190 z2d(:,:) = REAL( jpkm1 , wp ) ! flat bottom 191 191 ! 192 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero ( here jperio=0 ==>> closed)192 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! set surrounding land to zero (closed boundaries) 193 193 ! 194 194 k_bot(:,:) = NINT( z2d(:,:) ) ! =jpkm1 over the ocean point, =0 elsewhere -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/EXPREF/namelist_cfg
r14229 r15574 12 12 !! namtsd data: temperature & salinity (default: OFF) 13 13 !! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T) 14 !! namc1d 1D configuration options ( "key_c1d")15 !! namc1d_dyndmp 1D newtonian damping applied on currents ( "key_c1d")16 !! namc1d_uvd 1D data (currents) ( "key_c1d")14 !! namc1d 1D configuration options (ln_c1d =T) 15 !! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T) 16 !! namc1d_uvd 1D data (currents) (ln_c1d =T) 17 17 !!====================================================================== 18 18 ! … … 51 51 ! ! (=F) user defined configuration ==>>> see usrdef(_...) modules 52 52 ln_write_cfg = .true. ! (=T) create the domain configuration file 53 / 54 !----------------------------------------------------------------------- 55 &namtile ! parameters of the tiling 56 !----------------------------------------------------------------------- 53 57 / 54 58 !----------------------------------------------------------------------- -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/MY_SRC/usrdef_nam.F90
r13286 r15574 38 38 CONTAINS 39 39 40 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)40 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 41 41 !!---------------------------------------------------------------------- 42 42 !! *** ROUTINE dom_nam *** … … 50 50 !! ** input : - namusr_def namelist found in namelist_cfg 51 51 !!---------------------------------------------------------------------- 52 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 53 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 52 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 53 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 56 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 57 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 56 58 ! 57 59 INTEGER :: ios ! Local integer … … 75 77 kpk = INT( 10. / rn_dz ) + 1 76 78 ! ! Set the lateral boundary condition of the global domain 77 kperio = 0 ! WAD_TEST_CASES configuration : closed domain 79 ldIperio = .FALSE. ; ldJperio = .FALSE. ! WAD_TEST_CASES configuration : closed domain 80 ldNFold = .FALSE. ; cdNFtype = '-' 78 81 IF( nn_wad_test == 8 ) THEN 79 kperio = 7 ! North-South cyclic test82 ldIperio = .TRUE. ; ldJperio = .TRUE. ! WAD_TEST_CASES configuration : bi-periodic 80 83 kpi = kpi - 2 ! no closed boundary 81 84 kpj = kpj - 2 ! no closed boundary … … 95 98 WRITE(numout,*) ' jpkglo = ', kpk 96 99 WRITE(numout,*) ' ' 97 WRITE(numout,*) ' Lateral boundary condition of the global domain'98 WRITE(numout,*) ' closed jperio = ', kperio99 100 ENDIF 100 101 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/WAD/MY_SRC/usrdef_zgr.F90
r13295 r15574 230 230 231 231 ! at u-point: averaging zht 232 DO ji = 1, jpim1233 zhu(ji, :) = 0.5_wp * ( zht(ji,:) + zht(ji+1,:) )234 END DO232 DO_2D( 0, 0, 0, 0 ) 233 zhu(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji+1,jj) ) 234 END_2D 235 235 CALL lbc_lnk( 'usrdef_zgr', zhu, 'U', 1. ) ! boundary condition: this mask the surrounding grid-points 236 236 ! ! ==>>> set by hand non-zero value on first/last columns & rows … … 260 260 ! 261 261 ! no ocean cavities : top ocean level is ONE, except over land 262 ! the ocean basin surrounnded by land (1 grid-point) set through lbc_lnk call as jperio=0262 ! the ocean basin surrounnded by land (1+nn_hls grid-points) set through lbc_lnk call 263 263 z2d(:,:) = 1._wp ! surface ocean is the 1st level 264 264 z2d(mi0(1):mi1(1),:) = 0._wp … … 267 267 z2d(:,mj0(jpjglo):mj1(jpjglo)) = 0._wp 268 268 269 270 271 272 273 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin since jperio = 0 (see userdef_nam.F90) 269 CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. ) ! closed basin, see userdef_nam.F90 274 270 k_top(:,:) = NINT( z2d(:,:) ) 275 271 ! -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/demo_cfgs.txt
r14226 r15574 12 12 STATION_ASF OCE ICE 13 13 CPL_OASIS OCE TOP ICE NST 14 DIA_GPU OCE ICE 14 15 SWG OCE SWE 15 16 C1D_ASICS OCE
Note: See TracChangeset
for help on using the changeset viewer.