Changeset 11413 for NEMO/branches
- Timestamp:
- 2019-08-06T17:59:22+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D
- Files:
-
- 87 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/1_namelist_cfg
r11267 r11413 363 363 !! namdiu Cool skin and warm layer models (default: OFF) 364 364 !! namdiu Cool skin and warm layer models (default: OFF) 365 !! namflo float parameters ( "key_float")366 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")367 !! nam dct transports through some sections ("key_diadct")365 !! namflo float parameters (default: OFF) 366 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 367 !! nam_diadct transports through some sections (default: OFF) 368 368 !! nam_diatmb Top Middle Bottom Output (default: OFF) 369 369 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/2_namelist_cfg
r11267 r11413 312 312 !! namdiu Cool skin and warm layer models (default: OFF) 313 313 !! namdiu Cool skin and warm layer models (default: OFF) 314 !! namflo float parameters ( "key_float")315 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")316 !! nam dct transports through some sections ("key_diadct")314 !! namflo float parameters (default: OFF) 315 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 316 !! nam_diadct transports through some sections (default: OFF) 317 317 !! nam_diatmb Top Middle Bottom Output (default: OFF) 318 318 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/3_namelist_cfg
r11267 r11413 312 312 !! namdiu Cool skin and warm layer models (default: OFF) 313 313 !! namdiu Cool skin and warm layer models (default: OFF) 314 !! namflo float parameters ( "key_float")315 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")316 !! nam dct transports through some sections ("key_diadct")314 !! namflo float parameters (default: OFF) 315 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 316 !! nam_diadct transports through some sections (default: OFF) 317 317 !! nam_diatmb Top Middle Bottom Output (default: OFF) 318 318 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AGRIF_DEMO/EXPREF/namelist_cfg
r11275 r11413 362 362 !! namdiu Cool skin and warm layer models (default: OFF) 363 363 !! namdiu Cool skin and warm layer models (default: OFF) 364 !! namflo float parameters ( "key_float")365 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")366 !! nam dct transports through some sections ("key_diadct")364 !! namflo float parameters (default: OFF) 365 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 366 !! nam_diadct transports through some sections (default: OFF) 367 367 !! nam_diatmb Top Middle Bottom Output (default: OFF) 368 368 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AMM12/EXPREF/context_nemo.xml
r9930 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics --> … … 18 28 19 29 <axis_definition> 20 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />21 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />22 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />23 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />24 <axis id="nfloat" long_name="Float number" unit="-" />25 <axis id="icbcla" long_name="Iceberg class" unit="1"/>26 <axis id="ncatice" long_name="Ice category" unit="1"/>27 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>28 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>30 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 31 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 32 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 33 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 34 <axis id="nfloat" long_name="Float number" unit="-" /> 35 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 36 <axis id="ncatice" long_name="Ice category" unit="1" /> 37 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 38 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 29 39 </axis_definition> 30 40 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/AMM12/EXPREF/namelist_cfg
r11268 r11413 350 350 !! namdiu Cool skin and warm layer models (default: OFF) 351 351 !! namdiu Cool skin and warm layer models (default: OFF) 352 !! namflo float parameters ( "key_float")353 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")354 !! nam dct transports through some sections ("key_diadct")352 !! namflo float parameters (default: OFF) 353 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 354 !! nam_diadct transports through some sections (default: OFF) 355 355 !! nam_diatmb Top Middle Bottom Output (default: OFF) 356 356 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/C1D_PAPA/EXPREF/namelist_cfg
r11275 r11413 418 418 !! namdiu Cool skin and warm layer models (default: OFF) 419 419 !! namdiu Cool skin and warm layer models (default: OFF) 420 !! namflo float parameters ( "key_float")421 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")422 !! nam dct transports through some sections ("key_diadct")420 !! namflo float parameters (default: OFF) 421 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 422 !! nam_diadct transports through some sections (default: OFF) 423 423 !! nam_diatmb Top Middle Bottom Output (default: OFF) 424 424 !! nam_dia25h 25h Mean Output (default: OFF) … … 443 443 / 444 444 !----------------------------------------------------------------------- 445 &namflo ! float parameters ( "key_float")446 !----------------------------------------------------------------------- 447 / 448 !----------------------------------------------------------------------- 449 &nam_diaharm ! Harmonic analysis of tidal constituents ( "key_diaharm")450 !----------------------------------------------------------------------- 451 / 452 !----------------------------------------------------------------------- 453 &nam dct ! transports through some sections ("key_diadct")445 &namflo ! float parameters (default: OFF) 446 !----------------------------------------------------------------------- 447 / 448 !----------------------------------------------------------------------- 449 &nam_diaharm ! Harmonic analysis of tidal constituents (default: OFF) 450 !----------------------------------------------------------------------- 451 / 452 !----------------------------------------------------------------------- 453 &nam_diadct ! transports through some sections (default: OFF) 454 454 !----------------------------------------------------------------------- 455 455 / -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90
r10072 r11413 39 39 CONTAINS 40 40 41 SUBROUTINE usr_def_nam( ldtxt, ldnam,cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )41 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 42 42 !!---------------------------------------------------------------------- 43 43 !! *** ROUTINE dom_nam *** … … 51 51 !! ** input : - namusr_def namelist found in namelist_cfg 52 52 !!---------------------------------------------------------------------- 53 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information54 53 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 55 54 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution … … 57 56 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 58 57 ! 59 INTEGER :: ios , ii! Local integer58 INTEGER :: ios ! Local integer 60 59 !! 61 60 NAMELIST/namusr_def/ rn_bathy 62 61 !!---------------------------------------------------------------------- 63 62 ! 64 ii = 165 !66 63 REWIND( numnam_cfg ) ! Namelist namusr_def (exist in namelist_cfg only) 67 64 READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 68 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' , .TRUE.)65 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 69 66 ! 70 WRITE( ldnam(:), namusr_def )67 IF(lwm) WRITE( numond, namusr_def ) 71 68 ! 72 69 cd_cfg = 'C1D' ! name & resolution (not used) … … 77 74 kpj = 3 78 75 kpk = 75 79 !80 ! ! control print81 WRITE(ldtxt(ii),*) ' ' ; ii = ii + 182 WRITE(ldtxt(ii),*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' ; ii = ii + 183 WRITE(ldtxt(ii),*) '~~~~~~~~~~~ ' ; ii = ii + 184 WRITE(ldtxt(ii),*) ' Namelist namusr_def : C1 case' ; ii = ii + 185 WRITE(ldtxt(ii),*) ' type of vertical coordinate : ' ; ii = ii + 186 WRITE(ldtxt(ii),*) ' z-coordinate flag ln_zco = ', ln_zco ; ii = ii + 187 WRITE(ldtxt(ii),*) ' z-partial-step coordinate flag ln_zps = ', ln_zps ; ii = ii + 188 WRITE(ldtxt(ii),*) ' s-coordinate flag ln_sco = ', ln_sco ; ii = ii + 189 WRITE(ldtxt(ii),*) ' C1D domain = 3 x 3 x75 grid-points ' ; ii = ii + 190 WRITE(ldtxt(ii),*) ' resulting global domain size : jpiglo = ', kpi ; ii = ii + 191 WRITE(ldtxt(ii),*) ' jpjglo = ', kpj ; ii = ii + 192 WRITE(ldtxt(ii),*) ' jpkglo = ', kpk ; ii = ii + 193 94 !95 76 ! ! Set the lateral boundary condition of the global domain 96 77 kperio = 7 ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 97 78 ! 98 WRITE(ldtxt(ii),*) ' Lateral boundary condition of the global domain' ; ii = ii + 1 99 WRITE(ldtxt(ii),*) ' C1D : closed basin jperio = ', kperio ; ii = ii + 1 79 ! ! control print 80 IF(lwp) THEN 81 WRITE(numout,*) ' ' 82 WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' 83 WRITE(numout,*) '~~~~~~~~~~~ ' 84 WRITE(numout,*) ' Namelist namusr_def : C1 case' 85 WRITE(numout,*) ' type of vertical coordinate : ' 86 WRITE(numout,*) ' z-coordinate flag ln_zco = ', ln_zco 87 WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps 88 WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco 89 WRITE(numout,*) ' C1D domain = 3 x 3 x75 grid-points ' 90 WRITE(numout,*) ' resulting global domain size : jpiglo = ', kpi 91 WRITE(numout,*) ' jpjglo = ', kpj 92 WRITE(numout,*) ' jpkglo = ', kpk 93 WRITE(numout,*) ' Lateral boundary condition of the global domain' 94 WRITE(numout,*) ' C1D : closed basin jperio = ', kperio 95 ENDIF 100 96 ! 101 97 END SUBROUTINE usr_def_nam -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_BFM/EXPREF/context_nemo.xml
r9930 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics --> … … 19 29 20 30 <axis_definition> 21 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />22 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />23 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />24 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />25 <axis id="nfloat" long_name="Float number" unit="-" />26 <axis id="icbcla" long_name="Iceberg class" unit="1"/>27 <axis id="ncatice" long_name="Ice category" unit="1"/>28 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>29 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>31 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 32 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 33 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 34 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 35 <axis id="nfloat" long_name="Float number" unit="-" /> 36 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 37 <axis id="ncatice" long_name="Ice category" unit="1" /> 38 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 39 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 30 40 </axis_definition> 31 41 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_BFM/EXPREF/namelist_cfg
r10072 r11413 227 227 !! namdiu Cool skin and warm layer models (default: OFF) 228 228 !! namdiu Cool skin and warm layer models (default: OFF) 229 !! namflo float parameters ( "key_float")230 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")231 !! nam dct transports through some sections ("key_diadct")229 !! namflo float parameters (default: OFF) 230 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 231 !! nam_diadct transports through some sections (default: OFF) 232 232 !! nam_diatmb Top Middle Bottom Output (default: OFF) 233 233 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_PISCES/EXPREF/context_nemo.xml
r9930 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics --> … … 19 29 20 30 <axis_definition> 21 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />22 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />23 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />24 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />25 <axis id="nfloat" long_name="Float number" unit="-" />26 <axis id="icbcla" long_name="Iceberg class" unit="1"/>27 <axis id="ncatice" long_name="Ice category" unit="1"/>28 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>29 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>31 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 32 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 33 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 34 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 35 <axis id="nfloat" long_name="Float number" unit="-" /> 36 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 37 <axis id="ncatice" long_name="Ice category" unit="1" /> 38 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 39 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 30 40 </axis_definition> 31 41 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/GYRE_PISCES/EXPREF/namelist_cfg
r10072 r11413 221 221 !! namdiu Cool skin and warm layer models (default: OFF) 222 222 !! namdiu Cool skin and warm layer models (default: OFF) 223 !! namflo float parameters ( "key_float")224 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")225 !! nam dct transports through some sections ("key_diadct")223 !! namflo float parameters (default: OFF) 224 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 225 !! nam_diadct transports through some sections (default: OFF) 226 226 !! nam_diatmb Top Middle Bottom Output (default: OFF) 227 227 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_ABL/cpp_ORCA2_ICE_ABL.fcm
r11306 r11413 1 bld::tool::fppkeys key_mpp_mpi key_ iomput key_si31 bld::tool::fppkeys key_mpp_mpi key_si3 key_iomput -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/context_nemo.xml
r11275 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics --> … … 22 32 23 33 <axis_definition> 24 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />25 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />26 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />27 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />28 <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down" 29 <axis id="nfloat" long_name="Float number" unit="-" />30 <axis id="icbcla" long_name="Iceberg class" unit="1"/>31 <axis id="ncatice" long_name="Ice category" unit="1"/>32 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>33 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>34 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 35 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 36 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 37 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 38 <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down"/> 39 <axis id="nfloat" long_name="Float number" unit="-" /> 40 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 41 <axis id="ncatice" long_name="Ice category" unit="1" /> 42 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 43 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 34 44 <!-- ABL vertical axis definition --> 35 45 <axis id="ght_abl" long_name="ABL Vertical T levels" unit="m" positive="up" /> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml
r10911 r11413 78 78 <field field_ref="vfxice" name="vfxice" /> 79 79 <field field_ref="vfxsnw" name="vfxsnw" /> 80 80 81 81 <!-- categories --> 82 82 <field field_ref="icemask_cat" name="simskcat"/> … … 93 93 <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." > 94 94 <!-- global contents --> 95 <field field_ref="ibgvol_tot" grid_ref="grid_1point"name="ibgvol_tot" />96 <field field_ref="sbgvol_tot" grid_ref="grid_1point"name="sbgvol_tot" />97 <field field_ref="ibgarea_tot" grid_ref="grid_1point"name="ibgarea_tot" />98 <field field_ref="ibgsalt_tot" grid_ref="grid_1point"name="ibgsalt_tot" />99 <field field_ref="ibgheat_tot" grid_ref="grid_1point"name="ibgheat_tot" />100 <field field_ref="sbgheat_tot" grid_ref="grid_1point"name="sbgheat_tot" />95 <field field_ref="ibgvol_tot" name="ibgvol_tot" /> 96 <field field_ref="sbgvol_tot" name="sbgvol_tot" /> 97 <field field_ref="ibgarea_tot" name="ibgarea_tot" /> 98 <field field_ref="ibgsalt_tot" name="ibgsalt_tot" /> 99 <field field_ref="ibgheat_tot" name="ibgheat_tot" /> 100 <field field_ref="sbgheat_tot" name="sbgheat_tot" /> 101 101 102 102 <!-- global drifts (conservation checks) --> 103 <field field_ref="ibgvolume" grid_ref="grid_1point"name="ibgvolume" />104 <field field_ref="ibgsaltco" grid_ref="grid_1point"name="ibgsaltco" />105 <field field_ref="ibgheatco" grid_ref="grid_1point"name="ibgheatco" />106 <field field_ref="ibgheatfx" grid_ref="grid_1point"name="ibgheatfx" />103 <field field_ref="ibgvolume" name="ibgvolume" /> 104 <field field_ref="ibgsaltco" name="ibgsaltco" /> 105 <field field_ref="ibgheatco" name="ibgheatco" /> 106 <field field_ref="ibgheatfx" name="ibgheatfx" /> 107 107 108 108 <!-- global forcings --> 109 <field field_ref="ibgfrcvoltop" grid_ref="grid_1point"name="ibgfrcvoltop" />110 <field field_ref="ibgfrcvolbot" grid_ref="grid_1point"name="ibgfrcvolbot" />111 <field field_ref="ibgfrctemtop" grid_ref="grid_1point"name="ibgfrctemtop" />112 <field field_ref="ibgfrctembot" grid_ref="grid_1point"name="ibgfrctembot" />113 <field field_ref="ibgfrcsal" grid_ref="grid_1point"name="ibgfrcsal" />114 <field field_ref="ibgfrchfxtop" grid_ref="grid_1point"name="ibgfrchfxtop" />115 <field field_ref="ibgfrchfxbot" grid_ref="grid_1point"name="ibgfrchfxbot" />109 <field field_ref="ibgfrcvoltop" name="ibgfrcvoltop" /> 110 <field field_ref="ibgfrcvolbot" name="ibgfrcvolbot" /> 111 <field field_ref="ibgfrctemtop" name="ibgfrctemtop" /> 112 <field field_ref="ibgfrctembot" name="ibgfrctembot" /> 113 <field field_ref="ibgfrcsal" name="ibgfrcsal" /> 114 <field field_ref="ibgfrchfxtop" name="ibgfrchfxtop" /> 115 <field field_ref="ibgfrchfxbot" name="ibgfrchfxbot" /> 116 116 </file> 117 117 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml
r9990 r11413 37 37 <field field_ref="wspd" name="windsp" /> 38 38 <field field_ref="precip" name="precip" /> 39 <field field_ref="berg_melt_qlat" name="berg_melt_qlat" />40 39 <!-- ice and snow --> 41 40 <field field_ref="snowpre" /> … … 82 81 <file id="file15" name_suffix="_scalar" description="scalar variables" > 83 82 <!-- global drifts (conservation checks) --> 84 <field field_ref="bgtemper" grid_ref="grid_1point"name="bgtemper" />85 <field field_ref="bgsaline" grid_ref="grid_1point"name="bgsaline" />86 <field field_ref="bgheatco" grid_ref="grid_1point"name="bgheatco" />87 <field field_ref="bgheatfx" grid_ref="grid_1point"name="bgheatfx" />88 <field field_ref="bgsaltco" grid_ref="grid_1point"name="bgsaltco" />89 <field field_ref="bgvolssh" grid_ref="grid_1point"name="bgvolssh" />90 <field field_ref="bgvole3t" grid_ref="grid_1point"name="bgvole3t" />83 <field field_ref="bgtemper" name="bgtemper" /> 84 <field field_ref="bgsaline" name="bgsaline" /> 85 <field field_ref="bgheatco" name="bgheatco" /> 86 <field field_ref="bgheatfx" name="bgheatfx" /> 87 <field field_ref="bgsaltco" name="bgsaltco" /> 88 <field field_ref="bgvolssh" name="bgvolssh" /> 89 <field field_ref="bgvole3t" name="bgvole3t" /> 91 90 92 91 <!-- global surface forcings --> 93 <field field_ref="bgfrcvol" grid_ref="grid_1point"name="bgfrcvol" />94 <field field_ref="bgfrctem" grid_ref="grid_1point"name="bgfrctem" />95 <field field_ref="bgfrchfx" grid_ref="grid_1point"name="bgfrchfx" />96 <field field_ref="bgfrcsal" grid_ref="grid_1point"name="bgfrcsal" />92 <field field_ref="bgfrcvol" name="bgfrcvol" /> 93 <field field_ref="bgfrctem" name="bgfrctem" /> 94 <field field_ref="bgfrchfx" name="bgfrchfx" /> 95 <field field_ref="bgfrcsal" name="bgfrcsal" /> 97 96 </file> 98 97 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-pisces.xml
r9909 r11413 14 14 15 15 <file id="file31" name_suffix="_bioscalar" description="pisces sms variables" > 16 <field field_ref="tdenit" name="tdenit" grid_ref="grid_1point"unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>17 <field field_ref="tnfix" name="tnfix" grid_ref="grid_1point"unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>18 <field field_ref="tcflx" name="tcflx" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>19 <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point"unit="PgC" operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>20 <field field_ref="tcexp" name="tcexp" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>21 <field field_ref="tintpp" name="tintpp" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>22 <field field_ref="pno3tot" name="pno3tot" grid_ref="grid_1point"unit="umolN" > pno3tot * 16. / 122. * 1e6 </field>23 <field field_ref="ppo4tot" name="ppo4tot" grid_ref="grid_1point"unit="umolP" > ppo4tot * 1. / 122. * 1e6 </field>24 <field field_ref="psiltot" name="psiltot" grid_ref="grid_1point"unit="umolC" > psiltot * 1e6 </field>25 <field field_ref="palktot" name="palktot" grid_ref="grid_1point"unit="umolC" > palktot * 1e6 </field>26 <field field_ref="pfertot" name="pfertot" grid_ref="grid_1point"unit="nmolFe" > pfertot * 1e9 </field>16 <field field_ref="tdenit" name="tdenit" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 17 <field field_ref="tnfix" name="tnfix" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 18 <field field_ref="tcflx" name="tcflx" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 19 <field field_ref="tcflxcum" name="tcflxcum" unit="PgC" operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 20 <field field_ref="tcexp" name="tcexp" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 21 <field field_ref="tintpp" name="tintpp" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 22 <field field_ref="pno3tot" name="pno3tot" unit="umolN" > pno3tot * 16. / 122. * 1e6 </field> 23 <field field_ref="ppo4tot" name="ppo4tot" unit="umolP" > ppo4tot * 1. / 122. * 1e6 </field> 24 <field field_ref="psiltot" name="psiltot" unit="umolC" > psiltot * 1e6 </field> 25 <field field_ref="palktot" name="palktot" unit="umolC" > palktot * 1e6 </field> 26 <field field_ref="pfertot" name="pfertot" unit="nmolFe" > pfertot * 1e9 </field> 27 27 </file> 28 28 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg
r11275 r11413 390 390 !! namdiu Cool skin and warm layer models (default: OFF) 391 391 !! namdiu Cool skin and warm layer models (default: OFF) 392 !! namflo float parameters ( "key_float")393 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")394 !! nam dct transports through some sections ("key_diadct")392 !! namflo float parameters (default: OFF) 393 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 394 !! nam_diadct transports through some sections (default: OFF) 395 395 !! nam_diatmb Top Middle Bottom Output (default: OFF) 396 396 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_PISCES/EXPREF/context_nemo.xml
r10226 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- Ocean biology --> … … 19 29 20 30 <axis_definition> 21 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />22 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />23 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />24 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />25 <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down" 26 <axis id="nfloat" long_name="Float number" unit="-" />27 <axis id="icbcla" long_name="Iceberg class" unit="1"/>28 <axis id="ncatice" long_name="Ice category" unit="1"/>29 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>30 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>31 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 32 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 33 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 34 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 35 <axis id="profsed" long_name="Vertical S levels" unit="cm" positive="down"/> 36 <axis id="nfloat" long_name="Float number" unit="-" /> 37 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 38 <axis id="ncatice" long_name="Ice category" unit="1" /> 39 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 40 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 31 41 </axis_definition> 32 42 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_PISCES/EXPREF/file_def_nemo.xml
r10458 r11413 19 19 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files --> 20 20 <file id="file1" name_suffix="_bioscalar" description="pisces sms variables" > 21 <field field_ref="tdenit" name="tdenit" grid_ref="grid_1point"unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>22 <field field_ref="tnfix" name="tnfix" grid_ref="grid_1point"unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>23 <field field_ref="tcflx" name="tcflx" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>24 <field field_ref="tcflxcum" name="tcflxcum" grid_ref="grid_1point"unit="PgC" operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>25 <field field_ref="tcexp" name="tcexp" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>26 <field field_ref="tintpp" name="tintpp" grid_ref="grid_1point"unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>27 <field field_ref="pno3tot" name="pno3tot" grid_ref="grid_1point"unit="umolN" > pno3tot * 16. / 122. * 1e6 </field>28 <field field_ref="ppo4tot" name="ppo4tot" grid_ref="grid_1point"unit="umolP" > ppo4tot * 1. / 122. * 1e6 </field>29 <field field_ref="psiltot" name="psiltot" grid_ref="grid_1point"unit="umolC" > psiltot * 1e6 </field>30 <field field_ref="palktot" name="palktot" grid_ref="grid_1point"unit="umolC" > palktot * 1e6 </field>31 <field field_ref="pfertot" name="pfertot" grid_ref="grid_1point"unit="nmolFe" > pfertot * 1e9 </field>21 <field field_ref="tdenit" name="tdenit" unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field> 22 <field field_ref="tnfix" name="tnfix" unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field> 23 <field field_ref="tcflx" name="tcflx" unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field> 24 <field field_ref="tcflxcum" name="tcflxcum" unit="PgC" operation="instant" > tcflxcum * -1. * 12. / 1e15 </field> 25 <field field_ref="tcexp" name="tcexp" unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field> 26 <field field_ref="tintpp" name="tintpp" unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field> 27 <field field_ref="pno3tot" name="pno3tot" unit="umolN" > pno3tot * 16. / 122. * 1e6 </field> 28 <field field_ref="ppo4tot" name="ppo4tot" unit="umolP" > ppo4tot * 1. / 122. * 1e6 </field> 29 <field field_ref="psiltot" name="psiltot" unit="umolC" > psiltot * 1e6 </field> 30 <field field_ref="palktot" name="palktot" unit="umolC" > palktot * 1e6 </field> 31 <field field_ref="pfertot" name="pfertot" unit="nmolFe" > pfertot * 1e9 </field> 32 32 </file> 33 33 </file_group> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_PISCES/EXPREF/namelist_cfg
r11267 r11413 376 376 !! namdiu Cool skin and warm layer models (default: OFF) 377 377 !! namdiu Cool skin and warm layer models (default: OFF) 378 !! namflo float parameters ( "key_float")379 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")380 !! nam dct transports through some sections ("key_diadct")378 !! namflo float parameters (default: OFF) 379 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 380 !! nam_diadct transports through some sections (default: OFF) 381 381 !! nam_diatmb Top Middle Bottom Output (default: OFF) 382 382 !! nam_dia25h 25h Mean Output (default: OFF) … … 401 401 / 402 402 !----------------------------------------------------------------------- 403 &namflo ! float parameters ( "key_float")404 !----------------------------------------------------------------------- 405 / 406 !----------------------------------------------------------------------- 407 &nam_diaharm ! Harmonic analysis of tidal constituents ( "key_diaharm")408 !----------------------------------------------------------------------- 409 / 410 !----------------------------------------------------------------------- 411 &nam dct ! transports through some sections ("key_diadct")403 &namflo ! float parameters (default: OFF) 404 !----------------------------------------------------------------------- 405 / 406 !----------------------------------------------------------------------- 407 &nam_diaharm ! Harmonic analysis of tidal constituents (default: OFF) 408 !----------------------------------------------------------------------- 409 / 410 !----------------------------------------------------------------------- 411 &nam_diadct ! transports through some sections (default: OFF) 412 412 !----------------------------------------------------------------------- 413 413 / -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_TRC/EXPREF/context_nemo.xml
r9930 r11413 6 6 <context id="nemo"> 7 7 <!-- $id$ --> 8 <variable_definition> 9 <!-- Year of time origin for NetCDF files; defaults to 1800 --> 10 <variable id="ref_year" type="int" > 1800 </variable> 11 <variable id="rau0" type="float" > 1026.0 </variable> 12 <variable id="cpocean" type="float" > 3991.86795711963 </variable> 13 <variable id="convSpsu" type="float" > 0.99530670233846 </variable> 14 <variable id="rhoic" type="float" > 917.0 </variable> 15 <variable id="rhosn" type="float" > 330.0 </variable> 16 <variable id="missval" type="float" > 1.e20 </variable> 17 </variable_definition> 8 18 <!-- Fields definition --> 9 19 <field_definition src="./field_def_nemo-oce.xml"/> <!-- Ocean biology --> … … 19 29 20 30 <axis_definition> 21 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />22 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />23 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />24 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />25 <axis id="nfloat" long_name="Float number" unit="-" />26 <axis id="icbcla" long_name="Iceberg class" unit="1"/>27 <axis id="ncatice" long_name="Ice category" unit="1"/>28 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC"/>29 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC"/>31 <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 32 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 33 <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" /> 34 <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" /> 35 <axis id="nfloat" long_name="Float number" unit="-" /> 36 <axis id="icbcla" long_name="Iceberg class" unit="1" /> 37 <axis id="ncatice" long_name="Ice category" unit="1" /> 38 <axis id="iax_20C" long_name="20 degC isotherm" unit="degC" /> 39 <axis id="iax_28C" long_name="28 degC isotherm" unit="degC" /> 30 40 </axis_definition> 31 41 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_OFF_TRC/EXPREF/namelist_cfg
r11267 r11413 374 374 !! namdiu Cool skin and warm layer models (default: OFF) 375 375 !! namdiu Cool skin and warm layer models (default: OFF) 376 !! namflo float parameters ( "key_float")376 !! namflo float parameters (default: OFF) 377 377 !! nam_diaharm Harmonic analysis of tidal constituents ("key_diaharm") 378 378 !! namdct transports through some sections ("key_diadct") … … 399 399 / 400 400 !----------------------------------------------------------------------- 401 &namflo ! float parameters ( "key_float")401 &namflo ! float parameters (default: OFF) 402 402 !----------------------------------------------------------------------- 403 403 / -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ORCA2_SAS_ICE/EXPREF/namelist_cfg
r11275 r11413 58 58 !----------------------------------------------------------------------- 59 59 nn_fsbc = 1 ! frequency of SBC module call 60 ! (also = the frequency of sea-ice & iceberg model call) 61 ! Type of air-sea fluxes 60 62 ln_blk = .true. ! Bulk formulation (T => fill namsbc_blk ) 61 nn_ice = 2 ! =2 sea-ice model ("key_SI3" or "key_cice") 63 ln_abl = .false. ! ABL formulation (T => fill namsbc_abl ) 64 ! Sea-ice : 65 nn_ice = 2 ! =2 or 3 automatically for SI3 or CICE ("key_si3" or "key_cice") 66 ! except in AGRIF zoom where it has to be specified 62 67 / 63 68 !----------------------------------------------------------------------- … … 176 181 !! namdiu Cool skin and warm layer models (default: OFF) 177 182 !! namdiu Cool skin and warm layer models (default: OFF) 178 !! namflo float parameters ( "key_float")179 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")180 !! nam dct transports through some sections ("key_diadct")183 !! namflo float parameters (default: OFF) 184 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 185 !! nam_diadct transports through some sections (default: OFF) 181 186 !! nam_diatmb Top Middle Bottom Output (default: OFF) 182 187 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/domain_def_nemo.xml
r9930 r11413 10 10 </domain> 11 11 12 <domain id="1point" domain_ref="grid_T" >13 <zoom_domain ibegin="1" jbegin="1" ni="1" nj="1"/>14 </domain>15 12 <!-- Eq section --> 16 13 <domain id="EqT" domain_ref="grid_T" > <zoom_domain id="EqT"/> </domain> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/field_def_nemo-ice.xml
r11363 r11413 32 32 33 33 <!-- general fields --> 34 <field id="icemass" long_name="Sea-ice mass per area"standard_name="sea_ice_amount" unit="kg/m2"/>34 <field id="icemass" long_name="Sea-ice mass per gridcell area" standard_name="sea_ice_amount" unit="kg/m2"/> 35 35 <field id="snwmass" long_name="Snow mass per area" standard_name="liquid_water_content_of_surface_snow" unit="kg/m2"/> 36 <field id="iceconc" long_name="Sea-ice area fraction" standard_name="sea_ice_area_fraction" unit="" /> 37 <field id="icevolu" long_name="Sea-ice volume per area" standard_name="sea_ice_thickness" unit="m" /> 38 <field id="icethic" long_name="Sea-ice thickness per area" standard_name="sea_ice_thickness" unit="m" /> 39 <field id="snwthic" long_name="Snow thickness per area" standard_name="snow_thickness" unit="m" /> 40 <field id="icebrv" long_name="brine volume" unit="%" /> 41 <field id="iceage" long_name="ice age" unit="days"/> 42 <field id="icehnew" long_name="frazil ice collection thickness" unit="m" /> 43 <field id="snwvolu" long_name="snow volume" unit="m" /> 44 <field id="icefrb" long_name="Sea-ice freeboard" standard_name="sea_ice_freeboard" unit="m" /> 45 <field id="icealb" long_name="Sea-ice or snow albedo" standard_name="sea_ice_albedo" unit="" /> 46 <field id="tau_icebfr" long_name="ice friction on ocean bottom for landfast ice" unit="N/2" /> 36 <field id="iceconc" long_name="Sea-ice area fraction" standard_name="sea_ice_area_fraction" unit="" /> 37 <field id="icevolu" long_name="Sea-ice volume per area" standard_name="sea_ice_thickness" unit="m" /> 38 <field id="icethic" long_name="Sea-ice thickness" standard_name="sea_ice_thickness" unit="m" /> 39 <field id="snwthic" long_name="Snow thickness" standard_name="snow_thickness" unit="m" /> 40 <field id="icebrv" long_name="brine volume" unit="%" /> 41 <field id="iceage" long_name="ice age" unit="days" detect_missing_value="true"/> 42 <field id="icehnew" long_name="frazil ice collection thickness" unit="m" /> 43 <field id="snwvolu" long_name="snow volume" unit="m" /> 44 <field id="icefrb" long_name="Sea-ice freeboard" standard_name="sea_ice_freeboard" unit="m" /> 45 <field id="icealb" long_name="Sea-ice or snow albedo" standard_name="sea_ice_albedo" unit="" detect_missing_value="true" /> 47 46 48 47 <!-- melt ponds --> … … 51 50 52 51 <!-- heat --> 53 <field id="icetemp" long_name="Mean ice temperature" unit="degC" />54 <field id="snwtemp" long_name="Mean snow temperature" unit="degC" />55 <field id="icettop" long_name="temperature at the ice surface" unit="degC" />56 <field id="icetbot" long_name="temperature at the ice bottom" unit="degC" />57 <field id="icetsni" long_name="temperature at the snow-ice interface" unit="degC" />52 <field id="icetemp" long_name="Mean ice temperature" unit="degC" detect_missing_value="true" /> 53 <field id="snwtemp" long_name="Mean snow temperature" unit="degC" detect_missing_value="true" /> 54 <field id="icettop" long_name="temperature at the ice surface" unit="degC" detect_missing_value="true" /> 55 <field id="icetbot" long_name="temperature at the ice bottom" unit="degC" detect_missing_value="true" /> 56 <field id="icetsni" long_name="temperature at the snow-ice interface" unit="degC" detect_missing_value="true" /> 58 57 <field id="icehc" long_name="ice heat content" unit="J/m2" /> 59 58 <field id="snwhc" long_name="snow heat content" unit="J/m2" /> 60 59 61 60 <!-- salt --> 62 <field id="icesalt" long_name="Sea ice salinity" unit="g/kg" />61 <field id="icesalt" long_name="Sea ice salinity" unit="g/kg" detect_missing_value="true" /> 63 62 <field id="icesalm" long_name="Mass of salt in sea ice per area" standard_name="sea_ice_salt_mass" unit="kg/m2" /> 64 63 … … 71 70 <field id="utau_oi" long_name="X-component of ocean stress on sea ice" standard_name="sea_ice_base_upward_x_stress" unit="N/m2" /> 72 71 <field id="vtau_oi" long_name="Y-component of ocean stress on sea ice" standard_name="sea_ice_base_upward_y_stress" unit="N/m2" /> 72 <field id="utau_bi" long_name="X-component of ocean bottom stress on sea ice -landfast" standard_name="ocean_bottom_upward_x_stress" unit="N/m2" /> 73 <field id="vtau_bi" long_name="Y-component of ocean bottom stress on sea ice -landfast" standard_name="ocean_bottom_upward_y_stress" unit="N/m2" /> 73 74 <field id="isig1" long_name="1st principal stress component for EVP rhg" unit="" /> 74 75 <field id="isig2" long_name="2nd principal stress component for EVP rhg" unit="" /> … … 94 95 95 96 <!-- trends --> 96 <field id="afxthd" long_name="sea-ice area fraction change from thermodynamics" 97 <field id="afxdyn" long_name="sea-ice area fraction change from dynamics" 98 <field id="afxtot" long_name="area tendency (total)" 97 <field id="afxthd" long_name="sea-ice area fraction change from thermodynamics" standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 98 <field id="afxdyn" long_name="sea-ice area fraction change from dynamics" standard_name="tendency_of_sea_ice_area_fraction_due_to_dynamics" unit="s-1" /> 99 <field id="afxtot" long_name="area tendency (total)" unit="s-1" /> 99 100 100 101 <!-- momentum (advection) --> … … 170 171 <field id="e3t_m" unit="m" /> 171 172 <field id="frq_m" unit="-" /> 172 173 <!-- categories -->174 <field id="iceconc_cat" long_name="Sea-ice concentration per category" unit="" grid_ref="grid_T_3D_ncatice" />175 <field id="icethic_cat" long_name="Sea-ice thickness per category" unit="m" grid_ref="grid_T_3D_ncatice" />176 <field id="snwthic_cat" long_name="Snow thickness per category" unit="m" grid_ref="grid_T_3D_ncatice" />177 <field id="icesalt_cat" long_name="Sea-Ice Bulk salinity per category" unit="g/kg" grid_ref="grid_T_3D_ncatice" />178 <field id="icetemp_cat" long_name="Ice temperature per category" unit="degC" grid_ref="grid_T_3D_ncatice" />179 <field id="snwtemp_cat" long_name="Snow temperature per category" unit="degC" grid_ref="grid_T_3D_ncatice" />180 <field id="icettop_cat" long_name="Ice/snow surface temperature per category" unit="degC" grid_ref="grid_T_3D_ncatice" />181 <field id="iceapnd_cat" long_name="Ice melt pond concentration per category" unit="%" grid_ref="grid_T_3D_ncatice" />182 <field id="icehpnd_cat" long_name="Ice melt pond thickness per category" unit="m" grid_ref="grid_T_3D_ncatice" />183 <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category" unit="m" grid_ref="grid_T_3D_ncatice" />184 <field id="icemask_cat" long_name="Fraction of time step with sea ice (per category)" unit="" grid_ref="grid_T_3D_ncatice" />185 <field id="iceage_cat" long_name="Ice age per category" unit="days" grid_ref="grid_T_3D_ncatice" />186 <field id="icebrv_cat" long_name="Brine volume per category" unit="%" grid_ref="grid_T_3D_ncatice" />187 173 188 174 <!-- ================= --> … … 251 237 <field id="xmtrptot" long_name="X-component of sea-ice mass transport" standard_name="sea_ice_x_transport" unit="kg/s" > xmtrpice + xmtrpsnw </field> 252 238 <field id="ymtrptot" long_name="Y-component of sea-ice mass transport" standard_name="sea_ice_y_transport" unit="kg/s" > ymtrpice + ymtrpsnw </field> 253 254 <!-- categories -->255 <field id="iceconc_cat_cmip" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="" grid_ref="grid_T_3D_ncatice" > iceconc_cat * icemask_cat + $missval * (1.-icemask_cat) </field>256 <field id="icethic_cat_cmip" long_name="Sea-ice thickness in thickness categories" standard_name="sea_ice_thickness_over_categories" detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > icethic_cat * icemask_cat + $missval * (1.-icemask_cat) </field>257 <field id="snwthic_cat_cmip" long_name="Snow thickness in thickness categories" standard_name="snow_thickness_over_categories" detect_missing_value="true" unit="m" grid_ref="grid_T_3D_ncatice" > snwthic_cat * icemask_cat + $missval * (1.-icemask_cat) </field>258 <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%" grid_ref="grid_T_3D_ncatice" > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field>259 239 260 240 </field_group> <!-- SBC_2D --> 261 241 242 <!-- categories --> 243 <field_group id="SBC_3D" grid_ref="grid_T_ncatice" > 244 245 <!-- standard ice fields --> 246 <field id="iceconc_cat" long_name="Sea-ice concentration per category" unit="" /> 247 <field id="icethic_cat" long_name="Sea-ice thickness per category" unit="m" detect_missing_value="true" /> 248 <field id="snwthic_cat" long_name="Snow thickness per category" unit="m" detect_missing_value="true" /> 249 <field id="icesalt_cat" long_name="Sea-Ice Bulk salinity per category" unit="g/kg" detect_missing_value="true" /> 250 <field id="icetemp_cat" long_name="Ice temperature per category" unit="degC" detect_missing_value="true" /> 251 <field id="snwtemp_cat" long_name="Snow temperature per category" unit="degC" detect_missing_value="true" /> 252 <field id="icettop_cat" long_name="Ice/snow surface temperature per category" unit="degC" detect_missing_value="true" /> 253 <field id="iceapnd_cat" long_name="Ice melt pond concentration per category" unit="" /> 254 <field id="icehpnd_cat" long_name="Ice melt pond thickness per category" unit="m" detect_missing_value="true" /> 255 <field id="iceafpnd_cat" long_name="Ice melt pond fraction per category" unit="" /> 256 <field id="icemask_cat" long_name="Fraction of time step with sea ice (per category)" unit="" /> 257 <field id="iceage_cat" long_name="Ice age per category" unit="days" detect_missing_value="true" /> 258 <field id="icebrv_cat" long_name="Brine volume per category" unit="%" detect_missing_value="true" /> 259 260 <!-- Add-ons for SIMIP --> 261 <field id="iceconc_cat_cmip" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="" > iceconc_cat * icemask_cat + $missval * (1.-icemask_cat) </field> 262 <field id="icethic_cat_cmip" long_name="Sea-ice thickness in thickness categories" standard_name="sea_ice_thickness_over_categories" detect_missing_value="true" unit="m" > icethic_cat * icemask_cat + $missval * (1.-icemask_cat) </field> 263 <field id="snwthic_cat_cmip" long_name="Snow thickness in thickness categories" standard_name="snow_thickness_over_categories" detect_missing_value="true" unit="m" > snwthic_cat * icemask_cat + $missval * (1.-icemask_cat) </field> 264 <field id="iceconc_cat_pct_cmip" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories" detect_missing_value="true" unit="%" > iceconc_cat*100. * icemask_cat + $missval * (1.-icemask_cat) </field> 265 266 </field_group> <!-- SBC_3D --> 267 262 268 <!-- scalar variables --> 263 <field_group id="SBC_0D" grid_ref="grid_1point" > 269 <field_group id="SBC_scalar" grid_ref="grid_scalar" > 270 <field id="NH_iceextt" long_name="Sea ice extent North" standard_name="sea_ice_extent_n" unit="1e6_km2" /> 271 <field id="SH_iceextt" long_name="Sea ice extent South" standard_name="sea_ice_extent_s" unit="1e6_km2" /> 272 <field id="NH_icevolu" long_name="Sea ice volume North" standard_name="sea_ice_volume_n" unit="1e3_km3" /> 273 <field id="SH_icevolu" long_name="Sea ice volume South" standard_name="sea_ice_volume_s" unit="1e3_km3" /> 274 <field id="NH_icearea" long_name="Sea ice area North" standard_name="sea_ice_area_n" unit="1e6_km2" /> 275 <field id="SH_icearea" long_name="Sea ice area South" standard_name="sea_ice_area_s" unit="1e6_km2" /> 276 264 277 <!-- available with ln_icediaout --> 265 278 <field id="ibgfrcvoltop" long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)" unit="km3" /> … … 283 296 <field id="sbgheat_tot" long_name="global mean snow heat content" unit="1e20J" /> 284 297 285 <field id="NH_iceextt" long_name="Sea ice extent North" standard_name="sea_ice_extent_n" unit="1e6_km2" /> 286 <field id="SH_iceextt" long_name="Sea ice extent South" standard_name="sea_ice_extent_s" unit="1e6_km2" /> 287 <field id="NH_icevolu" long_name="Sea ice volume North" standard_name="sea_ice_volume_n" unit="1e3_km3" /> 288 <field id="SH_icevolu" long_name="Sea ice volume South" standard_name="sea_ice_volume_s" unit="1e3_km3" /> 289 <field id="NH_icearea" long_name="Sea ice area North" standard_name="sea_ice_area_n" unit="1e6_km2" /> 290 <field id="SH_icearea" long_name="Sea ice area South" standard_name="sea_ice_area_s" unit="1e6_km2" /> 291 298 <!-- available later --> 299 <!-- 292 300 <field id="strait_mifl" long_name="Sea ice mass flux through straits" standard_name="sea_ice_mass_transport_across_line" unit="kg/s" grid_ref="grid_4strait" /> 293 301 <field id="strait_arfl" long_name="Sea ice area flux through straits" standard_name="sea_ice_area_transport_across_line" unit="m2/s" grid_ref="grid_4strait" /> 294 302 <field id="strait_msfl" long_name="Sea ice snow flux through straits" standard_name="snow_mass_transport_across_line" unit="kg/s" grid_ref="grid_4strait" /> 295 </field_group> <!-- SBC_0D --> 303 --> 304 </field_group> 296 305 297 306 <!-- … … 301 310 302 311 <field_group id="myvarICE" grid_ref="grid_T_2D" > 303 <field field_ref="icethic" name="sithic" /> 304 <field field_ref="icevolu" name="sivolu" /> 305 <field field_ref="iceconc" name="siconc" /> 312 <!-- ice mask --> 313 <field field_ref="icemask" name="simsk" /> 314 <field field_ref="icemask05" name="simsk05" /> 315 <field field_ref="icemask15" name="simsk15" /> 316 317 <!-- general --> 318 <field field_ref="snwvolu" name="snvolu" /> 319 <field field_ref="snwthic" name="snthic" /> 320 <field field_ref="icethic" name="sithic" /> 321 <!-- 322 <field field_ref="icethic" name="sithic_max" operation="maximum" /> 323 <field field_ref="icethic" name="sithic_min" operation="minimum" /> 324 --> 325 <field field_ref="fasticepres" name="fasticepres" /> 326 <field field_ref="icevolu" name="sivolu" /> 327 <field field_ref="iceconc" name="siconc" /> 328 <field field_ref="icesalt" name="sisali" /> 329 <field field_ref="iceapnd" name="siapnd" /> 330 <field field_ref="icevpnd" name="sivpnd" /> 331 <field field_ref="iceage" name="siage" /> 332 <field field_ref="sst_m" name="sst_m" /> 333 <field field_ref="sss_m" name="sss_m" /> 334 335 <!-- heat --> 336 <field field_ref="icetemp" name="sitemp" /> 337 <field field_ref="snwtemp" name="sntemp" /> 338 <field field_ref="icettop" name="sittop" /> 339 <field field_ref="icetbot" name="sitbot" /> 340 <field field_ref="icetsni" name="sitsni" /> 341 342 <!-- momentum --> 343 <field field_ref="uice" name="sivelu" /> 344 <field field_ref="vice" name="sivelv" /> 345 <field field_ref="icevel" name="sivelo" /> 346 <field field_ref="utau_ai" name="utau_ai" /> 347 <field field_ref="vtau_ai" name="vtau_ai" /> 348 <field field_ref="utau_oi" name="utau_oi" /> 349 <field field_ref="vtau_oi" name="vtau_oi" /> 350 351 <!-- rheology --> 352 <field field_ref="icediv" name="sidive" /> 353 <field field_ref="iceshe" name="sishea" /> 354 <field field_ref="icestr" name="sistre" /> 355 <field field_ref="normstr" name="normstr" /> 356 <field field_ref="sheastr" name="sheastr" /> 357 <field field_ref="isig1" name="isig1" /> 358 <field field_ref="isig2" name="isig2" /> 359 <field field_ref="isig3" name="isig3" /> 360 361 <!-- heat fluxes --> 362 <field field_ref="qt_oce_ai" name="qt_oce_ai" /> 363 <field field_ref="qt_atm_oi" name="qt_atm_oi" /> 364 <field field_ref="qtr_ice_top" name="qtr_ice_top"/> 365 <field field_ref="qtr_ice_bot" name="qtr_ice_bot"/> 366 <field field_ref="qt_ice" name="qt_ice" /> 367 <field field_ref="qsr_ice" name="qsr_ice" /> 368 <field field_ref="qns_ice" name="qns_ice" /> 369 <field field_ref="qemp_ice" name="qemp_ice" /> 370 <field field_ref="albedo" name="albedo" /> 371 <field field_ref="icealb" name="icealb" /> 372 373 <field field_ref="hfxcndtop" name="hfxcndtop" /> 374 <field field_ref="hfxcndbot" name="hfxcndbot" /> 375 <field field_ref="hfxsensib" name="hfxsensib" /> 376 377 <field field_ref="icehc" name="icehc" /> 378 <field field_ref="snwhc" name="snwhc" /> 379 <field field_ref="hfxbog" name="hfxbog" /> 380 <field field_ref="hfxbom" name="hfxbom" /> 381 <field field_ref="hfxsum" name="hfxsum" /> 382 <field field_ref="hfxopw" name="hfxopw" /> 383 <field field_ref="hfxdif" name="hfxdif" /> 384 <field field_ref="hfxsnw" name="hfxsnw" /> 385 <field field_ref="hfxerr" name="hfxerr" /> 386 <field field_ref="hfxthd" name="hfxthd" /> 387 <field field_ref="hfxdyn" name="hfxdyn" /> 388 <field field_ref="hfxres" name="hfxres" /> 389 <field field_ref="hfxsub" name="hfxsub" /> 390 <field field_ref="hfxspr" name="hfxspr" /> 391 392 <!-- 393 <field field_ref="hfxdhc" name="hfxbudget" operation="average" freq_op="1d" > @qt_atm_oi - @qt_oce_ai -@hfxdhc </field> 394 --> 395 396 <!-- salt fluxes --> 397 <field field_ref="sfxice" name="sfxice" /> 398 399 <!-- mass fluxes --> 400 <field field_ref="vfxice" name="vfxice" /> 401 <field field_ref="vfxsnw" name="vfxsnw" /> 402 403 <field field_ref="vfxbom" name="vfxbom" /> 404 <field field_ref="vfxbog" name="vfxbog" /> 405 <field field_ref="vfxsum" name="vfxsum" /> 406 <field field_ref="vfxopw" name="vfxopw" /> 407 <field field_ref="vfxlam" name="vfxlam" /> 408 <field field_ref="vfxsni" name="vfxsni" /> 409 <field field_ref="vfxdyn" name="vfxdyn" /> 410 <field field_ref="vfxres" name="vfxres" /> 411 <field field_ref="vfxpnd" name="vfxpnd" /> 412 <field field_ref="vfxsub" name="vfxsub" /> 413 <field field_ref="vfxsub_err" name="vfxsub_err" /> 414 <field field_ref="vfxthin" name="vfxthin" /> 415 416 <!-- diag error for negative ice volume after advection --> 417 <field field_ref="iceneg_pres" name="sineg_pres" /> 418 <field field_ref="iceneg_volu" name="sineg_volu" /> 419 <field field_ref="iceneg_hfx" name="sineg_hfx" /> 420 </field_group> 421 422 423 <field_group id="myvarICE_cat" grid_ref="grid_T_ncatice" > 424 425 <!-- categories --> 426 <field field_ref="icemask_cat" name="simskcat"/> 427 <field field_ref="snwthic_cat" name="snthicat"/> 428 <field field_ref="iceconc_cat" name="siconcat"/> 429 <field field_ref="icethic_cat" name="sithicat"/> 430 <field field_ref="icesalt_cat" name="sisalcat"/> 431 <field field_ref="icetemp_cat" name="sitemcat"/> 432 <field field_ref="snwtemp_cat" name="sntemcat"/> 433 <field field_ref="icettop_cat" name="sitopcat"/> 434 306 435 </field_group> 307 436 308 <field_group id="ICE_globalbudget" grid_ref="grid_1point" > 437 <field_group id="ICE_globalbudget" grid_ref="grid_scalar" > 438 <!-- global contents --> 309 439 <field field_ref="ibgvol_tot" name="ibgvol_tot" /> 310 440 <field field_ref="sbgvol_tot" name="sbgvol_tot" /> … … 314 444 <field field_ref="sbgheat_tot" name="sbgheat_tot" /> 315 445 316 <field field_ref="ibgvolume" name="ibgvolume" /> 446 <!-- global drifts (conservation checks) --> 447 <field field_ref="ibgvolume" name="ibgvolume" /> 317 448 <field field_ref="ibgsaltco" name="ibgsaltco" /> 318 449 <field field_ref="ibgheatco" name="ibgheatco" /> 319 450 <field field_ref="ibgheatfx" name="ibgheatfx" /> 320 451 452 <!-- global forcings --> 321 453 <field field_ref="ibgfrcvoltop" name="ibgfrcvoltop" /> 322 454 <field field_ref="ibgfrcvolbot" name="ibgfrcvolbot" /> … … 335 467 336 468 <!-- SIMIP monthly scalar variables --> 337 <field_group id="SImon_scalars" grid_ref="grid_ 1point" >469 <field_group id="SImon_scalars" grid_ref="grid_scalar" > 338 470 <!-- Integrated quantities --> 339 471 <field field_ref="NH_iceextt" name="siextentn" /> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/field_def_nemo-oce.xml
r11363 r11413 343 343 </field_group> 344 344 345 <!-- scalar variables -->346 <field_group id="SBC_0D" grid_ref="grid_1point" >347 </field_group>348 345 349 346 </field_group> <!-- SBC --> … … 515 512 <field id="ahmf_3d" long_name=" 3D f-eddy viscosity coefficient" unit="m2/s or m4/s" grid_ref="grid_T_3D"/> 516 513 517 <field_group id="scalar" grid_ref="grid_ T_2D" >514 <field_group id="scalar" grid_ref="grid_scalar" > 518 515 <!-- Need to have a salinity reference climatological file : sali_ref_clim_monthly --> 519 516 <field id="voltot" long_name="global total volume" standard_name="sea_water_volume" unit="m3" /> … … 542 539 </field_group> 543 540 544 <!-- variables available with key_float-->541 <!-- variables available with ln_floats --> 545 542 546 543 <field_group id="floatvar" grid_ref="grid_T_nfloat" operation="instant" > -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/field_def_nemo-pisces.xml
r10416 r11413 290 290 </field_group> 291 291 292 <field_group id="tracer_scalar" grid_ref="grid_ T_2D" >292 <field_group id="tracer_scalar" grid_ref="grid_scalar" > 293 293 <!-- PISCES scalar --> 294 294 <field id="pno3tot" long_name="Global mean nitrate concentration" unit="mol/m3" /> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/grid_def_nemo.xml
r11363 r11413 7 7 </grid> 8 8 <!-- --> 9 <grid id="grid_T_ 3D_ncatice" >9 <grid id="grid_T_ncatice" > 10 10 <domain id="grid_T" /> 11 11 <axis id="ncatice" /> … … 49 49 </grid> 50 50 <!-- --> 51 <grid id="grid_1point" >52 <domain domain_ref="1point"/>53 </grid>54 <!-- -->55 51 <grid id="grid_T_nfloat" > 56 52 <domain id="grid_T" /> 57 53 <axis id="nfloat" /> 58 54 </grid> 55 <!-- scalars --> 56 <grid id="grid_scalar" > 57 <scalar/> 58 </grid> 59 59 60 60 <!-- ABL grid definition --> -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/namelist_ice_ref
r10911 r11413 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 !! SI3 namelist:2 !! SI3 Reference namelist: 3 3 !! 1 - Generic parameters (nampar) 4 4 !! 2 - Ice thickness discretization (namitd) … … 56 56 rn_ishlat = 2. ! lbc : free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2) 57 57 ln_landfast_L16 = .false. ! landfast: parameterization from Lemieux 2016 58 ln_landfast_home = .false. ! landfast: parameterization from "home made"59 58 rn_depfra = 0.125 ! fraction of ocean depth that ice must reach to initiate landfast 60 59 ! recommended range: [0.1 ; 0.25] - L16=0.125 - home=0.15 … … 189 188 ln_iceini = .true. ! activate ice initialization (T) or not (F) 190 189 ln_iceini_file = .false. ! netcdf file provided for initialization (T) or not (F) 191 rn_thres_sst = 2.0 ! max delta temp. above Tfreeze with initial ice = (sst - tfreeze) 192 rn_hts_ini_n = 0.3 ! initial real snow thickness (m), North 190 rn_thres_sst = 2.0 ! max temp. above Tfreeze with initial ice = (sst - tfreeze) 191 rn_hti_ini_n = 3.0 ! initial ice thickness (m), North 192 rn_hti_ini_s = 1.0 ! " " South 193 rn_hts_ini_n = 0.3 ! initial snow thickness (m), North 193 194 rn_hts_ini_s = 0.3 ! " " South 194 rn_hti_ini_n = 3.0 ! initial real ice thickness (m), North195 rn_hti_ini_s = 1.0 ! " " South196 195 rn_ati_ini_n = 0.9 ! initial ice concentration (-), North 197 196 rn_ati_ini_s = 0.9 ! " " South 198 197 rn_smi_ini_n = 6.3 ! initial ice salinity (g/kg), North 199 198 rn_smi_ini_s = 6.3 ! " " South 200 rn_tmi_ini_n = 270. ! initial ice /snw temperature(K), North199 rn_tmi_ini_n = 270. ! initial ice temperature (K), North 201 200 rn_tmi_ini_s = 270. ! " " South 202 201 rn_tsu_ini_n = 270. ! initial surface temperature (K), North 202 rn_tsu_ini_s = 270. ! " " South 203 rn_tms_ini_n = 270. ! initial snw temperature (K), North 204 rn_tms_ini_s = 270. ! " " South 205 rn_apd_ini_n = 0.2 ! initial pond fraction (-), North 206 rn_apd_ini_s = 0.2 ! " " South 207 rn_hpd_ini_n = 0.05 ! initial pond depth (m), North 208 rn_hpd_ini_s = 0.05 ! " " South 209 ! ! if ln_iceini_file=T 203 210 sn_hti = 'Ice_initialization' , -12 ,'hti' , .false. , .true., 'yearly' , '' , '', '' 204 211 sn_hts = 'Ice_initialization' , -12 ,'hts' , .false. , .true., 'yearly' , '' , '', '' 205 212 sn_ati = 'Ice_initialization' , -12 ,'ati' , .false. , .true., 'yearly' , '' , '', '' 213 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 214 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 206 215 sn_tsu = 'Ice_initialization' , -12 ,'tsu' , .false. , .true., 'yearly' , '' , '', '' 207 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 208 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 216 sn_tms = 'NOT USED' , -12 ,'tms' , .false. , .true., 'yearly' , '' , '', '' 217 sn_apd = 'NOT USED' , -12 ,'apd' , .false. , .true., 'yearly' , '' , '', '' 218 sn_hpd = 'NOT USED' , -12 ,'hpd' , .false. , .true., 'yearly' , '' , '', '' 209 219 cn_dir='./' 210 220 / -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SHARED/namelist_ref
r11363 r11413 50 50 cn_ocerst_indir = "." ! directory from which to read input ocean restarts 51 51 cn_ocerst_out = "restart" ! suffix of ocean restart name (output) 52 cn_ocerst_outdir = "." 52 cn_ocerst_outdir = "." ! directory in which to write output ocean restarts 53 53 ln_iscpl = .false. ! cavity evolution forcing or coupling to ice sheet model 54 54 nn_istate = 0 ! output the initial state (1) or not (0) 55 55 ln_rst_list = .false. ! output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 56 nn_stock = 5840 ! frequency of creation of a restart file (modulo referenced to 1) 56 nn_stock = 0 ! used only if ln_rst_list = F: output restart freqeuncy (modulo referenced to 1) 57 ! ! = 0 force to write restart files only at the end of the run 58 ! ! = -1 do not do any restart 57 59 nn_stocklist = 0,0,0,0,0,0,0,0,0,0 ! List of timesteps when a restart file is to be written 58 nn_write = 5840 ! frequency of write in the output file (modulo referenced to nn_it000) 60 nn_write = 0 ! used only if key_iomput is not defined: output frequency (modulo referenced to nn_it000) 61 ! ! = 0 force to write output files only at the end of the run 62 ! ! = -1 do not do any output file 59 63 ln_mskland = .false. ! mask land points in NetCDF outputs 60 64 ln_cfmeta = .false. ! output additional data to netCDF files required for compliance with the CF metadata standard … … 195 199 ln_flx = .false. ! flux formulation (T => fill namsbc_flx ) 196 200 ln_blk = .false. ! Bulk formulation (T => fill namsbc_blk ) 197 ln_abl = .false. ! ABL formulation (T => fill namsbc_abl )198 201 ! ! Type of coupling (Ocean/Ice/Atmosphere) : 199 202 ln_cpl = .false. ! atmosphere coupled formulation ( requires key_oasis3 ) … … 277 280 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 278 281 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 279 sn_hpgi = 'NOT USED' , 24. , 'xxx' , .false. , .true. , 'yearly' , '' , '' , ''280 sn_hpgj = 'NOT USED' , 24. , 'xxx' , .false. , .true. , 'yearly' , '' , '' , ''281 /282 !-----------------------------------------------------------------------283 &namsbc_abl ! Atmospheric Boundary Layer formulation (ln_abl = T)284 !-----------------------------------------------------------------------285 cn_dir = './' ! root directory for the location of the ABL grid file286 cn_dom = 'dom_cfg_abl.nc'287 ln_hpgls_frc = .false.288 ln_geos_winds = .false.289 nn_dyn_restore = 1290 rn_ldyn_min = 16. ! magnitude of the nudging on ABL dynamics at the bottom of the ABL [hour]291 rn_ldyn_max = 1.6 ! magnitude of the nudging on ABL dynamics at the top of the ABL [hour]292 rn_ltra_min = 16. ! magnitude of the nudging on ABL tracers at the bottom of the ABL [hour]293 rn_ltra_max = 1.6 ! magnitude of the nudging on ABL tracers at the top of the ABL [hour]294 nn_amxl = 0 ! mixing length: = 0 Deardorff 80 length-scale295 ! = 1 length-scale based on the distance to the PBL height296 ! = 2 Bougeault & Lacarrere 89 length-scale297 rn_Cm = 0.0667 ! 0.126 in MesoNH298 rn_Ct = 0.1667 ! 0.143 in MesoNH299 rn_Ce = 0.4 ! 0.4 in MesoNH300 rn_Ceps = 0.7 ! 0.85 in MesoNH301 rn_Rod = 0.15 ! c0 in RMCA17 mixing length formulation (not yet implemented)302 rn_Ric = 0.139 ! Critical Richardson number (to compute PBL height and diffusivities)303 ln_smth_pblh = .false. ! Smoothing of PBL height with a 2d Hanning filter304 282 / 305 283 !----------------------------------------------------------------------- … … 589 567 !----------------------------------------------------------------------- 590 568 ln_tide = .false. ! Activate tides 591 ln_tide_pot = .true. ! use tidal potential forcing 592 ln_scal_load = .false. ! Use scalar approximation for 593 ln_read_load = .false. ! Or read load potential from file 594 cn_tide_load = 'tide_LOAD_grid_T.nc' ! filename for load potential 595 ln_tide_ramp = .false. ! Use linear ramp for tides at startup 596 rn_scal_load = 0.094 ! load potential 597 rdttideramp = 0. ! ramp duration in days 598 clname = 'FOUR' ! name of constituent - all tidal components must be set in namelist_cfg 569 ln_tide_pot = .false. ! use tidal potential forcing 570 ln_scal_load = .false. ! Use scalar approximation for 571 rn_scal_load = 0.094 ! load potential 572 ln_read_load = .false. ! Or read load potential from file 573 cn_tide_load = 'tide_LOAD_grid_T.nc' ! filename for load potential 574 ! 575 ln_tide_ramp = .false. ! Use linear ramp for tides at startup 576 rdttideramp = 0. ! ramp duration in days 577 clname(1) = 'DUMMY' ! name of constituent - all tidal components must be set in namelist_cfg 599 578 / 600 579 !----------------------------------------------------------------------- … … 876 855 rn_lf_cutoff = 5.0 ! cutoff frequency for low-pass filter [days] 877 856 rn_zdef_max = 0.9 ! maximum fractional e3t deformation 878 ln_vvl_dbg = . true.! debug prints (T/F)857 ln_vvl_dbg = .false. ! debug prints (T/F) 879 858 / 880 859 !----------------------------------------------------------------------- … … 1127 1106 !! namdiu Cool skin and warm layer models (default: OFF) 1128 1107 !! namdiu Cool skin and warm layer models (default: OFF) 1129 !! namflo float parameters ( "key_float")1130 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")1131 !! nam dct transports through some sections ("key_diadct")1108 !! namflo float parameters (default: OFF) 1109 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 1110 !! nam_diadct transports through some sections (default: OFF) 1132 1111 !! nam_diatmb Top Middle Bottom Output (default: OFF) 1133 1112 !! nam_dia25h 25h Mean Output (default: OFF) … … 1164 1143 &namhsb ! Heat and salt budgets (default: OFF) 1165 1144 !----------------------------------------------------------------------- 1166 ln_diahsb = .false. ! checkthe heat and salt budgets (T) or not (F)1145 ln_diahsb = .false. ! output the heat and salt budgets (T) or not (F) 1167 1146 / 1168 1147 !----------------------------------------------------------------------- … … 1173 1152 / 1174 1153 !----------------------------------------------------------------------- 1175 &namflo ! float parameters ("key_float") 1176 !----------------------------------------------------------------------- 1177 jpnfl = 1 ! total number of floats during the run 1178 jpnnewflo = 0 ! number of floats for the restart 1179 ln_rstflo = .false. ! float restart (T) or not (F) 1180 nn_writefl = 75 ! frequency of writing in float output file 1181 nn_stockfl = 5475 ! frequency of creation of the float restart file 1182 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 1183 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 1184 ! ! or computed with Blanke' scheme (F) 1185 ln_ariane = .true. ! Input with Ariane tool convention(T) 1186 ln_flo_ascii = .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 1187 / 1188 !----------------------------------------------------------------------- 1189 &nam_diaharm ! Harmonic analysis of tidal constituents ("key_diaharm") 1190 !----------------------------------------------------------------------- 1191 nit000_han = 1 ! First time step used for harmonic analysis 1192 nitend_han = 75 ! Last time step used for harmonic analysis 1193 nstep_han = 15 ! Time step frequency for harmonic analysis 1194 tname(1) = 'M2' ! Name of tidal constituents 1195 tname(2) = 'K1' 1196 / 1197 !----------------------------------------------------------------------- 1198 &namdct ! transports through some sections ("key_diadct") 1199 !----------------------------------------------------------------------- 1200 nn_dct = 15 ! time step frequency for transports computing 1201 nn_dctwri = 15 ! time step frequency for transports writing 1202 nn_secdebug = 112 ! 0 : no section to debug 1203 ! ! -1 : debug all section 1204 ! ! 0 < n : debug section number n 1154 &namflo ! float parameters (default: OFF) 1155 !----------------------------------------------------------------------- 1156 ln_floats = .false. ! activate floats or not 1157 jpnfl = 1 ! total number of floats during the run 1158 jpnnewflo = 0 ! number of floats for the restart 1159 ln_rstflo = .false. ! float restart (T) or not (F) 1160 nn_writefl = 75 ! frequency of writing in float output file 1161 nn_stockfl = 5475 ! frequency of creation of the float restart file 1162 ln_argo = .false. ! Argo type floats (stay at the surface each 10 days) 1163 ln_flork4 = .false. ! trajectories computed with a 4th order Runge-Kutta (T) 1164 ! ! or computed with Blanke' scheme (F) 1165 ln_ariane = .true. ! Input with Ariane tool convention(T) 1166 ln_flo_ascii= .true. ! Output with Ariane tool netcdf convention(F) or ascii file (T) 1167 / 1168 !----------------------------------------------------------------------- 1169 &nam_diaharm ! Harmonic analysis of tidal constituents (default: OFF) 1170 !----------------------------------------------------------------------- 1171 ln_diaharm = .false. ! Choose tidal harmonic output or not 1172 nit000_han = 1 ! First time step used for harmonic analysis 1173 nitend_han = 75 ! Last time step used for harmonic analysis 1174 nstep_han = 15 ! Time step frequency for harmonic analysis 1175 tname(1) = 'M2' ! Name of tidal constituents 1176 tname(2) = 'K1' ! --- 1177 / 1178 !----------------------------------------------------------------------- 1179 &nam_diadct ! transports through some sections (default: OFF) 1180 !----------------------------------------------------------------------- 1181 ln_diadct = .false. ! Calculate transport thru sections or not 1182 nn_dct = 15 ! time step frequency for transports computing 1183 nn_dctwri = 15 ! time step frequency for transports writing 1184 nn_secdebug = 112 ! 0 : no section to debug 1185 ! ! -1 : debug all section 1186 ! ! 0 < n : debug section number n 1205 1187 / 1206 1188 !----------------------------------------------------------------------- … … 1320 1302 &nammpp ! Massively Parallel Processing ("key_mpp_mpi") 1321 1303 !----------------------------------------------------------------------- 1322 cn_mpi_send = 'I' ! mpi send/recieve type ='S', 'B', or 'I' for standard send, 1323 ! ! buffer blocking send or immediate non-blocking sends, resp. 1324 nn_buffer = 0 ! size in bytes of exported buffer ('B' case), 0 no exportation 1304 ln_listonly = .false. ! do nothing else than listing the best domain decompositions (with land domains suppression) 1305 ! ! if T: the largest number of cores tested is defined by max(mppsize, jpni*jpnj) 1325 1306 ln_nnogather = .true. ! activate code to avoid mpi_allgather use at the northfold 1326 jpni = 0 ! jpni number of processors following i (set automatically if < 1)1327 jpnj = 0 ! jpnj number of processors following j (set automatically if < 1)1307 jpni = 0 ! number of processors following i (set automatically if < 1), see also ln_listonly = T 1308 jpnj = 0 ! number of processors following j (set automatically if < 1), see also ln_listonly = T 1328 1309 / 1329 1310 !----------------------------------------------------------------------- … … 1332 1313 ln_ctl = .FALSE. ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 1333 1314 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following 1334 sn_cfctl%l_runstat = . FALSE.! switches and which areas produce reports with the proc integer settings.1315 sn_cfctl%l_runstat = .TRUE. ! switches and which areas produce reports with the proc integer settings. 1335 1316 sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 1336 1317 sn_cfctl%l_oceout = .FALSE. ! that all areas report. -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SPITZ12/EXPREF/file_def_nemo-ice.xml
r10911 r11413 93 93 <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." > 94 94 <!-- global contents --> 95 <field field_ref="ibgvol_tot" grid_ref="grid_1point"name="ibgvol_tot" />96 <field field_ref="sbgvol_tot" grid_ref="grid_1point"name="sbgvol_tot" />97 <field field_ref="ibgarea_tot" grid_ref="grid_1point"name="ibgarea_tot" />98 <field field_ref="ibgsalt_tot" grid_ref="grid_1point"name="ibgsalt_tot" />99 <field field_ref="ibgheat_tot" grid_ref="grid_1point"name="ibgheat_tot" />100 <field field_ref="sbgheat_tot" grid_ref="grid_1point"name="sbgheat_tot" />95 <field field_ref="ibgvol_tot" name="ibgvol_tot" /> 96 <field field_ref="sbgvol_tot" name="sbgvol_tot" /> 97 <field field_ref="ibgarea_tot" name="ibgarea_tot" /> 98 <field field_ref="ibgsalt_tot" name="ibgsalt_tot" /> 99 <field field_ref="ibgheat_tot" name="ibgheat_tot" /> 100 <field field_ref="sbgheat_tot" name="sbgheat_tot" /> 101 101 102 102 <!-- global drifts (conservation checks) --> 103 <field field_ref="ibgvolume" grid_ref="grid_1point"name="ibgvolume" />104 <field field_ref="ibgsaltco" grid_ref="grid_1point"name="ibgsaltco" />105 <field field_ref="ibgheatco" grid_ref="grid_1point"name="ibgheatco" />106 <field field_ref="ibgheatfx" grid_ref="grid_1point"name="ibgheatfx" />103 <field field_ref="ibgvolume" name="ibgvolume" /> 104 <field field_ref="ibgsaltco" name="ibgsaltco" /> 105 <field field_ref="ibgheatco" name="ibgheatco" /> 106 <field field_ref="ibgheatfx" name="ibgheatfx" /> 107 107 108 108 <!-- global forcings --> 109 <field field_ref="ibgfrcvoltop" grid_ref="grid_1point"name="ibgfrcvoltop" />110 <field field_ref="ibgfrcvolbot" grid_ref="grid_1point"name="ibgfrcvolbot" />111 <field field_ref="ibgfrctemtop" grid_ref="grid_1point"name="ibgfrctemtop" />112 <field field_ref="ibgfrctembot" grid_ref="grid_1point"name="ibgfrctembot" />113 <field field_ref="ibgfrcsal" grid_ref="grid_1point"name="ibgfrcsal" />114 <field field_ref="ibgfrchfxtop" grid_ref="grid_1point"name="ibgfrchfxtop" />115 <field field_ref="ibgfrchfxbot" grid_ref="grid_1point"name="ibgfrchfxbot" />109 <field field_ref="ibgfrcvoltop" name="ibgfrcvoltop" /> 110 <field field_ref="ibgfrcvolbot" name="ibgfrcvolbot" /> 111 <field field_ref="ibgfrctemtop" name="ibgfrctemtop" /> 112 <field field_ref="ibgfrctembot" name="ibgfrctembot" /> 113 <field field_ref="ibgfrcsal" name="ibgfrcsal" /> 114 <field field_ref="ibgfrchfxtop" name="ibgfrchfxtop" /> 115 <field field_ref="ibgfrchfxbot" name="ibgfrchfxbot" /> 116 116 </file> 117 117 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SPITZ12/EXPREF/file_def_nemo-oce.xml
r9572 r11413 81 81 <file id="file15" name_suffix="_scalar" description="scalar variables" > 82 82 <!-- global drifts (conservation checks) --> 83 <field field_ref="bgtemper" grid_ref="grid_1point"name="bgtemper" />84 <field field_ref="bgsaline" grid_ref="grid_1point"name="bgsaline" />85 <field field_ref="bgheatco" grid_ref="grid_1point"name="bgheatco" />86 <field field_ref="bgheatfx" grid_ref="grid_1point"name="bgheatfx" />87 <field field_ref="bgsaltco" grid_ref="grid_1point"name="bgsaltco" />88 <field field_ref="bgvolssh" grid_ref="grid_1point"name="bgvolssh" />89 <field field_ref="bgvole3t" grid_ref="grid_1point"name="bgvole3t" />83 <field field_ref="bgtemper" name="bgtemper" /> 84 <field field_ref="bgsaline" name="bgsaline" /> 85 <field field_ref="bgheatco" name="bgheatco" /> 86 <field field_ref="bgheatfx" name="bgheatfx" /> 87 <field field_ref="bgsaltco" name="bgsaltco" /> 88 <field field_ref="bgvolssh" name="bgvolssh" /> 89 <field field_ref="bgvole3t" name="bgvole3t" /> 90 90 91 91 <!-- global surface forcings --> 92 <field field_ref="bgfrcvol" grid_ref="grid_1point"name="bgfrcvol" />93 <field field_ref="bgfrctem" grid_ref="grid_1point"name="bgfrctem" />94 <field field_ref="bgfrchfx" grid_ref="grid_1point"name="bgfrchfx" />95 <field field_ref="bgfrcsal" grid_ref="grid_1point"name="bgfrcsal" />92 <field field_ref="bgfrcvol" name="bgfrcvol" /> 93 <field field_ref="bgfrctem" name="bgfrctem" /> 94 <field field_ref="bgfrchfx" name="bgfrchfx" /> 95 <field field_ref="bgfrcsal" name="bgfrcsal" /> 96 96 </file> 97 97 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/SPITZ12/EXPREF/namelist_cfg
r11275 r11413 351 351 !! namdiu Cool skin and warm layer models (default: OFF) 352 352 !! namdiu Cool skin and warm layer models (default: OFF) 353 !! namflo float parameters ( "key_float")354 !! nam_diaharm Harmonic analysis of tidal constituents ( "key_diaharm")355 !! nam dct transports through some sections ("key_diadct")353 !! namflo float parameters (default: OFF) 354 !! nam_diaharm Harmonic analysis of tidal constituents (default: OFF) 355 !! nam_diadct transports through some sections (default: OFF) 356 356 !! nam_diatmb Top Middle Bottom Output (default: OFF) 357 357 !! nam_dia25h 25h Mean Output (default: OFF) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/cfgs/ref_cfgs.txt
r11306 r11413 9 9 ORCA2_ICE_PISCES OCE TOP ICE NST 10 10 ORCA2_ICE_ABL OCE ICE ABL 11 ORCA2_SAS_ICE_ABL OCE SAS ICE ABL 12 ORCA2_ICE OCE ICE 11 13 SPITZ12 OCE ICE 14 eORCA025_ICE OCE ICE 15 eORCA025_ICE_ABL OCE ICE ABL -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/ice.F90
r10882 r11413 102 102 !! vt_i | - | Total ice vol. per unit area | m | 103 103 !! vt_s | - | Total snow vol. per unit ar. | m | 104 !! st_i | - | Total Sea ice salt content | pss.m | 104 105 !! sm_i | - | Mean sea ice salinity | pss | 105 106 !! tm_i | - | Mean sea ice temperature | K | … … 135 136 REAL(wp), PUBLIC :: rn_ishlat !: lateral boundary condition for sea-ice 136 137 LOGICAL , PUBLIC :: ln_landfast_L16 !: landfast ice parameterizationfrom lemieux2016 137 LOGICAL , PUBLIC :: ln_landfast_home !: landfast ice parameterizationfrom home made138 138 REAL(wp), PUBLIC :: rn_depfra !: fraction of ocean depth that ice must reach to initiate landfast ice 139 139 REAL(wp), PUBLIC :: rn_icebfr !: maximum bottom stress per unit area of contact (lemieux2016) or per unit volume (home) … … 213 213 REAL(wp), PUBLIC, PARAMETER :: epsi20 = 1.e-20_wp !: small number 214 214 215 ! !!** some other parameters for advection using the ULTIMATE-MACHO scheme216 LOGICAL, PUBLIC, DIMENSION(2) :: l_split_advumx = .FALSE. ! force one iteration at the first time-step217 218 215 ! !!** define arrays 219 216 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_oce,v_oce !: surface ocean velocity used in ice dynamics … … 251 248 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_res !: mass flux from residual component of wfx_ice [kg.m-2.s-1] 252 249 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wfx_err_sub !: mass flux error after sublimation [kg.m-2.s-1] 253 254 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: afx_tot !: ice concentration tendency (total) [s-1]255 250 256 251 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sfx_bog !: salt flux due to ice bottom growth [pss.kg.m-2.s-1 => g.m-2.s-1] … … 309 304 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice, v_ice !: components of the ice velocity (m/s) 310 305 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vt_i , vt_s !: ice and snow total volume per unit area (m) 306 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: st_i !: Total ice salinity content (pss.m) 311 307 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: at_i !: ice total fractional area (ice concentration) 312 308 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ato_i !: =1-at_i ; total open water fractional area … … 409 405 & wfx_bog (jpi,jpj) , wfx_dyn (jpi,jpj) , wfx_bom(jpi,jpj) , wfx_sum(jpi,jpj) , & 410 406 & wfx_res (jpi,jpj) , wfx_sni (jpi,jpj) , wfx_opw(jpi,jpj) , wfx_spr(jpi,jpj) , & 411 & afx_tot (jpi,jpj) , rn_amax_2d(jpi,jpj),&407 & rn_amax_2d (jpi,jpj) , & 412 408 & qsb_ice_bot(jpi,jpj) , qlead (jpi,jpj) , & 413 409 & sfx_res (jpi,jpj) , sfx_bri (jpi,jpj) , sfx_dyn(jpi,jpj) , sfx_sub(jpi,jpj) , sfx_lam(jpi,jpj) , & … … 429 425 ii = ii + 1 430 426 ALLOCATE( u_ice(jpi,jpj) , v_ice(jpi,jpj) , & 431 & vt_i (jpi,jpj) , vt_s (jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) , &432 & et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s 433 & sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s 427 & vt_i (jpi,jpj) , vt_s (jpi,jpj) , st_i(jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) , & 428 & et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s(jpi,jpj) , & 429 & sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s(jpi,jpj) , & 434 430 & om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj) , STAT=ierr(ii) ) 435 431 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icecor.F90
r10994 r11413 17 17 USE phycst ! physical constants 18 18 USE ice ! sea-ice: variable 19 USE ice1D ! sea-ice: thermodynamic sea-icevariables19 USE ice1D ! sea-ice: thermodynamic variables 20 20 USE iceitd ! sea-ice: rebining 21 21 USE icevar ! sea-ice: operations … … 78 78 ! !----------------------------------------------------- 79 79 at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) 80 DO jl 80 DO jl = 1, jpl 81 81 WHERE( at_i(:,:) > rn_amax_2d(:,:) ) a_i(:,:,jl) = a_i(:,:,jl) * rn_amax_2d(:,:) / at_i(:,:) 82 82 END DO … … 84 84 ! !----------------------------------------------------- 85 85 IF ( nn_icesal == 2 ) THEN ! salinity must stay in bounds [Simin,Simax] ! 86 !!-----------------------------------------------------86 ! !----------------------------------------------------- 87 87 zzc = rhoi * r1_rdtice 88 88 DO jl = 1, jpl … … 117 117 END DO 118 118 END DO 119 CALL lbc_lnk_multi( 'icecor', u_ice, 'U', -1., v_ice, 'V', -1. ) ! lateral boundary conditions119 CALL lbc_lnk_multi( 'icecor', u_ice, 'U', -1., v_ice, 'V', -1. ) 120 120 ENDIF 121 121 122 !!gm I guess the trends are only out on demand123 !! So please, only do this is it exite an iom_use of on a these variables124 !! furthermore, only allocate the diag_ arrays in this case125 !! and do the iom_put here so that it is only a local allocation126 !!gm127 122 ! !----------------------------------------------------- 128 123 SELECT CASE( kn ) ! Diagnostics ! … … 130 125 CASE( 1 ) !--- dyn trend diagnostics 131 126 ! 132 !!gm here I think the number of ice cat is too small to use a SUM instruction... 133 DO jj = 1, jpj 134 DO ji = 1, jpi 135 ! ! heat content variation (W.m-2) 136 diag_heat(ji,jj) = - ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) & 137 & + SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) ) * r1_rdtice 138 ! ! salt, volume 139 diag_sice(ji,jj) = SUM( sv_i(ji,jj,:) - sv_i_b(ji,jj,:) ) * rhoi * r1_rdtice 140 diag_vice(ji,jj) = SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoi * r1_rdtice 141 diag_vsnw(ji,jj) = SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhos * r1_rdtice 142 END DO 143 END DO 127 IF( ln_icediachk .OR. iom_use('hfxdhc') ) THEN 128 diag_heat(:,:) = - SUM(SUM( e_i (:,:,1:nlay_i,:) - e_i_b (:,:,1:nlay_i,:), dim=4 ), dim=3 ) * r1_rdtice & ! W.m-2 129 & - SUM(SUM( e_s (:,:,1:nlay_s,:) - e_s_b (:,:,1:nlay_s,:), dim=4 ), dim=3 ) * r1_rdtice 130 diag_sice(:,:) = SUM( sv_i(:,:,:) - sv_i_b(:,:,:) , dim=3 ) * r1_rdtice * rhoi 131 diag_vice(:,:) = SUM( v_i (:,:,:) - v_i_b (:,:,:) , dim=3 ) * r1_rdtice * rhoi 132 diag_vsnw(:,:) = SUM( v_s (:,:,:) - v_s_b (:,:,:) , dim=3 ) * r1_rdtice * rhos 133 ENDIF 144 134 ! ! concentration tendency (dynamics) 145 zafx (:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 146 afx_tot(:,:) = zafx(:,:) 147 IF( iom_use('afxdyn') ) CALL iom_put( 'afxdyn' , zafx(:,:) ) 135 IF( iom_use('afxdyn') .OR. iom_use('afxthd') .OR. iom_use('afxtot') ) THEN 136 zafx(:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 137 CALL iom_put( 'afxdyn' , zafx ) 138 ENDIF 148 139 ! 149 140 CASE( 2 ) !--- thermo trend diagnostics & ice aging … … 151 142 oa_i(:,:,:) = oa_i(:,:,:) + a_i(:,:,:) * rdt_ice ! ice natural aging incrementation 152 143 ! 153 !!gm here I think the number of ice cat is too small to use a SUM instruction... 154 DO jj = 1, jpj155 DO ji = 1, jpi156 ! ! heat content variation (W.m-2)157 diag_heat(ji,jj) = diag_heat(ji,jj) - ( SUM( e_i(ji,jj,1:nlay_i,:) - e_i_b(ji,jj,1:nlay_i,:) ) &158 & + SUM( e_s(ji,jj,1:nlay_s,:) - e_s_b(ji,jj,1:nlay_s,:) ) ) * r1_rdtice159 ! ! salt, volume160 diag_sice(ji,jj) = diag_sice(ji,jj) + SUM( sv_i(ji,jj,:) - sv_i_b(ji,jj,:) ) * rhoi * r1_rdtice161 diag_vice(ji,jj) = diag_vice(ji,jj) + SUM( v_i (ji,jj,:) - v_i_b (ji,jj,:) ) * rhoi * r1_rdtice162 diag_vsnw(ji,jj) = diag_vsnw(ji,jj) + SUM( v_s (ji,jj,:) - v_s_b (ji,jj,:) ) * rhos * r1_rdtice163 END DO164 END DO144 IF( ln_icediachk .OR. iom_use('hfxdhc') ) THEN 145 diag_heat(:,:) = diag_heat(:,:) & 146 & - SUM(SUM( e_i (:,:,1:nlay_i,:) - e_i_b (:,:,1:nlay_i,:), dim=4 ), dim=3 ) * r1_rdtice & 147 & - SUM(SUM( e_s (:,:,1:nlay_s,:) - e_s_b (:,:,1:nlay_s,:), dim=4 ), dim=3 ) * r1_rdtice 148 diag_sice(:,:) = diag_sice(:,:) & 149 & + SUM( sv_i(:,:,:) - sv_i_b(:,:,:) , dim=3 ) * r1_rdtice * rhoi 150 diag_vice(:,:) = diag_vice(:,:) & 151 & + SUM( v_i (:,:,:) - v_i_b (:,:,:) , dim=3 ) * r1_rdtice * rhoi 152 diag_vsnw(:,:) = diag_vsnw(:,:) & 153 & + SUM( v_s (:,:,:) - v_s_b (:,:,:) , dim=3 ) * r1_rdtice * rhos 154 CALL iom_put ( 'hfxdhc' , diag_heat ) 155 ENDIF 165 156 ! ! concentration tendency (total + thermo) 166 zafx (:,:) = SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 167 afx_tot(:,:) = afx_tot(:,:) + zafx(:,:) 168 IF( iom_use('afxthd') ) CALL iom_put( 'afxthd' , zafx(:,:) ) 169 IF( iom_use('afxtot') ) CALL iom_put( 'afxtot' , afx_tot(:,:) ) 157 IF( iom_use('afxdyn') .OR. iom_use('afxthd') .OR. iom_use('afxtot') ) THEN 158 zafx(:,:) = zafx(:,:) + SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice 159 CALL iom_put( 'afxthd' , SUM( a_i(:,:,:) - a_i_b(:,:,:), dim=3 ) * r1_rdtice ) 160 CALL iom_put( 'afxtot' , zafx ) 161 ENDIF 170 162 ! 171 163 END SELECT … … 174 166 IF( ln_icediachk ) CALL ice_cons_hsm(1, 'icecor', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation 175 167 IF( ln_ctl ) CALL ice_prt3D ('icecor') ! prints 176 IF( ln_icectl .AND. kn == 2 ) CALL ice_prt( kt, iiceprt, jiceprt, 2, ' - Final state - ' ) ! prints 168 IF( ln_icectl .AND. kn == 2 ) & 169 & CALL ice_prt ( kt, iiceprt, jiceprt, 2, ' - Final state - ' ) ! prints 177 170 IF( ln_timing ) CALL timing_stop ('icecor') ! timing 178 171 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icectl.F90
r10994 r11413 157 157 ! check conservation issues 158 158 IF ( ABS( zv ) > zv_sill ) WRITE(numout,*) 'violation volume [Mt/day] (',cd_routine,') = ',zv 159 IF ( ABS( zs ) > zs_sill ) WRITE(numout,*) 'violation saline [ psu*Mt/day](',cd_routine,') = ',zs159 IF ( ABS( zs ) > zs_sill ) WRITE(numout,*) 'violation saline [Mkg/day] (',cd_routine,') = ',zs 160 160 IF ( ABS( zt ) > zt_sill ) WRITE(numout,*) 'violation enthalpy [GW] (',cd_routine,') = ',zt 161 161 ! check maximum ice concentration … … 218 218 IF(lwp) THEN 219 219 IF( ABS( zvfx ) > zv_sill ) WRITE(numout,*) 'violation vfx [Mt/day] (',cd_routine,') = ',zvfx 220 IF( ABS( zsfx ) > zs_sill ) WRITE(numout,*) 'violation sfx [ psu*Mt/day](',cd_routine,') = ',zsfx220 IF( ABS( zsfx ) > zs_sill ) WRITE(numout,*) 'violation sfx [Mkg/day] (',cd_routine,') = ',zsfx 221 221 !!IF( ABS( zhfx ) > zt_sill ) WRITE(numout,*) 'violation hfx [GW] (',cd_routine,') = ',zhfx 222 222 ENDIF -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedia.F90
r11348 r11413 34 34 PUBLIC ice_dia_init ! called in icestp.F90 35 35 36 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: vol_loc_ini, sal_loc_ini, tem_loc_ini ! initial volume, salt and heat contents 36 REAL(wp), SAVE :: z1_e1e2 ! inverse of the ocean area 37 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: vol_loc_ini, sal_loc_ini, tem_loc_ini ! initial volume, salt and heat contents 37 38 REAL(wp) :: frc_sal, frc_voltop, frc_volbot, frc_temtop, frc_tembot ! global forcing trends 38 39 … … 80 81 ENDIF 81 82 82 !!gm glob_sum includes a " * tmask_i ", so remove " * tmask(:,:,1) " 83 83 IF( kt == nit000 ) THEN 84 z1_e1e2 = 1._wp / glob_sum( 'icedia', e1e2t(:,:) ) 85 ENDIF 86 84 87 ! ----------------------- ! 85 ! 1 - Contents !88 ! 1 - Contents ! 86 89 ! ----------------------- ! 87 zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9 ! ice volume (km3) 88 zbg_svol = glob_sum( 'icedia', vt_s(:,:) * e1e2t(:,:) ) * 1.e-9 ! snow volume (km3) 89 zbg_area = glob_sum( 'icedia', at_i(:,:) * e1e2t(:,:) ) * 1.e-6 ! area (km2) 90 zbg_isal = glob_sum( 'icedia', SUM( sv_i(:,:,:), dim=3 ) * e1e2t(:,:) ) * 1.e-9 ! salt content (pss*km3) 91 zbg_item = glob_sum( 'icedia', et_i * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 92 zbg_stem = glob_sum( 'icedia', et_s * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 93 90 IF( iom_use('ibgvol_tot' ) .OR. iom_use('sbgvol_tot' ) .OR. iom_use('ibgarea_tot') .OR. & 91 & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') ) THEN 92 93 zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9 ! ice volume (km3) 94 zbg_svol = glob_sum( 'icedia', vt_s(:,:) * e1e2t(:,:) ) * 1.e-9 ! snow volume (km3) 95 zbg_area = glob_sum( 'icedia', at_i(:,:) * e1e2t(:,:) ) * 1.e-6 ! area (km2) 96 zbg_isal = glob_sum( 'icedia', st_i(:,:) * e1e2t(:,:) ) * 1.e-9 ! salt content (pss*km3) 97 zbg_item = glob_sum( 'icedia', et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 98 zbg_stem = glob_sum( 'icedia', et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J) 99 100 CALL iom_put( 'ibgvol_tot' , zbg_ivol ) 101 CALL iom_put( 'sbgvol_tot' , zbg_svol ) 102 CALL iom_put( 'ibgarea_tot' , zbg_area ) 103 CALL iom_put( 'ibgsalt_tot' , zbg_isal ) 104 CALL iom_put( 'ibgheat_tot' , zbg_item ) 105 CALL iom_put( 'sbgheat_tot' , zbg_stem ) 106 107 ENDIF 108 94 109 ! ---------------------------! 95 110 ! 2 - Trends due to forcing ! 96 111 ! ---------------------------! 112 ! they must be kept outside an IF(iom_use) because of the call to dia_rst below 97 113 z_frc_volbot = r1_rau0 * glob_sum( 'icedia', -( wfx_ice(:,:) + wfx_snw(:,:) + wfx_err_sub(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! freshwater flux ice/snow-ocean 98 114 z_frc_voltop = r1_rau0 * glob_sum( 'icedia', -( wfx_sub(:,:) + wfx_spr(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! freshwater flux ice/snow-atm … … 106 122 frc_temtop = frc_temtop + z_frc_temtop * rdt_ice ! 1.e20 J 107 123 frc_tembot = frc_tembot + z_frc_tembot * rdt_ice ! 1.e20 J 124 125 CALL iom_put( 'ibgfrcvoltop' , frc_voltop ) ! vol forcing ice/snw-atm (km3 equivalent ocean water) 126 CALL iom_put( 'ibgfrcvolbot' , frc_volbot ) ! vol forcing ice/snw-ocean (km3 equivalent ocean water) 127 CALL iom_put( 'ibgfrcsal' , frc_sal ) ! sal - forcing (psu*km3 equivalent ocean water) 128 CALL iom_put( 'ibgfrctemtop' , frc_temtop ) ! heat on top of ice/snw/ocean (1.e20 J) 129 CALL iom_put( 'ibgfrctembot' , frc_tembot ) ! heat on top of ocean(below ice) (1.e20 J) 130 131 IF( iom_use('ibgfrchfxtop') .OR. iom_use('ibgfrchfxbot') ) THEN 132 CALL iom_put( 'ibgfrchfxtop' , frc_temtop * z1_e1e2 * 1.e-20 * kt*rdt ) ! heat on top of ice/snw/ocean (W/m2) 133 CALL iom_put( 'ibgfrchfxbot' , frc_tembot * z1_e1e2 * 1.e-20 * kt*rdt ) ! heat on top of ocean(below ice) (W/m2) 134 ENDIF 135 136 ! ---------------------------------- ! 137 ! 3 - Content variations and drifts ! 138 ! ---------------------------------- ! 139 IF( iom_use('ibgvolume') .OR. iom_use('ibgsaltco') .OR. iom_use('ibgheatco') .OR. iom_use('ibgheatfx') ) THEN 108 140 109 ! ----------------------- ! 110 ! 3 - Content variations ! 111 ! ----------------------- ! 112 zdiff_vol = r1_rau0 * glob_sum( 'icedia', ( rhoi*vt_i(:,:) + rhos*vt_s(:,:) - vol_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! freshwater trend (km3) 113 zdiff_sal = r1_rau0 * glob_sum( 'icedia', ( rhoi* SUM( sv_i(:,:,:), dim=3 ) - sal_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! salt content trend (km3*pss) 114 zdiff_tem = glob_sum( 'icedia', ( et_i(:,:) + et_s(:,:) - tem_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-20 ! heat content trend (1.e20 J) 115 ! + SUM( qevap_ice * a_i_b, dim=3 ) !! clem: I think this term should not be there (but needs a check) 116 117 ! ----------------------- ! 118 ! 4 - Drifts ! 119 ! ----------------------- ! 120 zdiff_vol = zdiff_vol - ( frc_voltop + frc_volbot ) 121 zdiff_sal = zdiff_sal - frc_sal 122 zdiff_tem = zdiff_tem - ( frc_tembot - frc_temtop ) 123 124 ! ----------------------- ! 125 ! 5 - Diagnostics writing ! 126 ! ----------------------- ! 127 !!gm I don't understand the division by the ocean surface (i.e. glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt ) 128 !! and its multiplication bu kt ! is it really what we want ? what is this quantity ? 129 !! IF it is really what we want, compute it at kt=nit000, not 3 time by time-step ! 130 !! kt*rdt : you mean rdtice ? 131 !!gm 132 ! 133 IF( iom_use('ibgvolume') ) CALL iom_put( 'ibgvolume' , zdiff_vol ) ! ice/snow volume drift (km3 equivalent ocean water) 134 IF( iom_use('ibgsaltco') ) CALL iom_put( 'ibgsaltco' , zdiff_sal ) ! ice salt content drift (psu*km3 equivalent ocean water) 135 IF( iom_use('ibgheatco') ) CALL iom_put( 'ibgheatco' , zdiff_tem ) ! ice/snow heat content drift (1.e20 J) 136 IF( iom_use('ibgheatfx') ) CALL iom_put( 'ibgheatfx' , & ! ice/snow heat flux drift (W/m2) 137 & zdiff_tem /glob_sum( 'icedia', e1e2t(:,:) * 1.e-20 * kt*rdt ) ) 138 139 IF( iom_use('ibgfrcvoltop') ) CALL iom_put( 'ibgfrcvoltop' , frc_voltop ) ! vol forcing ice/snw-atm (km3 equivalent ocean water) 140 IF( iom_use('ibgfrcvolbot') ) CALL iom_put( 'ibgfrcvolbot' , frc_volbot ) ! vol forcing ice/snw-ocean (km3 equivalent ocean water) 141 IF( iom_use('ibgfrcsal') ) CALL iom_put( 'ibgfrcsal' , frc_sal ) ! sal - forcing (psu*km3 equivalent ocean water) 142 IF( iom_use('ibgfrctemtop') ) CALL iom_put( 'ibgfrctemtop' , frc_temtop ) ! heat on top of ice/snw/ocean (1.e20 J) 143 IF( iom_use('ibgfrctembot') ) CALL iom_put( 'ibgfrctembot' , frc_tembot ) ! heat on top of ocean(below ice) (1.e20 J) 144 IF( iom_use('ibgfrchfxtop') ) CALL iom_put( 'ibgfrchfxtop' , & ! heat on top of ice/snw/ocean (W/m2) 145 & frc_temtop / glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt ) 146 IF( iom_use('ibgfrchfxbot') ) CALL iom_put( 'ibgfrchfxbot' , & ! heat on top of ocean(below ice) (W/m2) 147 & frc_tembot / glob_sum( 'icedia', e1e2t(:,:) ) * 1.e-20 * kt*rdt ) 148 149 IF( iom_use('ibgvol_tot' ) ) CALL iom_put( 'ibgvol_tot' , zbg_ivol ) ! ice volume (km3) 150 IF( iom_use('sbgvol_tot' ) ) CALL iom_put( 'sbgvol_tot' , zbg_svol ) ! snow volume (km3) 151 IF( iom_use('ibgarea_tot') ) CALL iom_put( 'ibgarea_tot' , zbg_area ) ! ice area (km2) 152 IF( iom_use('ibgsalt_tot') ) CALL iom_put( 'ibgsalt_tot' , zbg_isal ) ! ice salinity content (pss*km3) 153 IF( iom_use('ibgheat_tot') ) CALL iom_put( 'ibgheat_tot' , zbg_item ) ! ice heat content (1.e20 J) 154 IF( iom_use('sbgheat_tot') ) CALL iom_put( 'sbgheat_tot' , zbg_stem ) ! snow heat content (1.e20 J) 155 ! 141 zdiff_vol = r1_rau0 * glob_sum( 'icedia', ( rhoi*vt_i(:,:) + rhos*vt_s(:,:) - vol_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! freshwater trend (km3) 142 zdiff_sal = r1_rau0 * glob_sum( 'icedia', ( rhoi*st_i(:,:) - sal_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-9 ! salt content trend (km3*pss) 143 zdiff_tem = glob_sum( 'icedia', ( et_i(:,:) + et_s(:,:) - tem_loc_ini(:,:) ) * e1e2t(:,:) ) * 1.e-20 ! heat content trend (1.e20 J) 144 ! + SUM( qevap_ice * a_i_b, dim=3 ) !! clem: I think this term should not be there (but needs a check) 145 146 zdiff_vol = zdiff_vol - ( frc_voltop + frc_volbot ) 147 zdiff_sal = zdiff_sal - frc_sal 148 zdiff_tem = zdiff_tem - ( frc_tembot - frc_temtop ) 149 150 CALL iom_put( 'ibgvolume' , zdiff_vol ) ! ice/snow volume drift (km3 equivalent ocean water) 151 CALL iom_put( 'ibgsaltco' , zdiff_sal ) ! ice salt content drift (psu*km3 equivalent ocean water) 152 CALL iom_put( 'ibgheatco' , zdiff_tem ) ! ice/snow heat content drift (1.e20 J) 153 ! 154 ENDIF 155 156 156 IF( lrst_ice ) CALL ice_dia_rst( 'WRITE', kt_ice ) 157 157 ! … … 248 248 vol_loc_ini(:,:) = rhoi * vt_i(:,:) + rhos * vt_s(:,:) ! ice/snow volume (kg/m2) 249 249 tem_loc_ini(:,:) = et_i(:,:) + et_s(:,:) ! ice/snow heat content (J) 250 sal_loc_ini(:,:) = rhoi * SUM( sv_i(:,:,:), dim=3 )! ice salt content (pss*kg/m2)250 sal_loc_ini(:,:) = rhoi * st_i(:,:) ! ice salt content (pss*kg/m2) 251 251 ENDIF 252 252 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn.F90
r11348 r11413 163 163 END DO 164 164 CALL lbc_lnk( 'icedyn', zdivu_i, 'T', 1. ) 165 CALL iom_put( "icediv" , zdivu_i(:,:) ) 165 ! output 166 CALL iom_put( 'icediv' , zdivu_i ) 167 166 168 DEALLOCATE( zdivu_i ) 167 169 … … 219 221 NAMELIST/namdyn/ ln_dynALL, ln_dynRHGADV, ln_dynADV1D, ln_dynADV2D, rn_uice, rn_vice, & 220 222 & rn_ishlat , & 221 & ln_landfast_L16, ln_landfast_home,rn_depfra, rn_icebfr, rn_lfrelax, rn_tensile223 & ln_landfast_L16, rn_depfra, rn_icebfr, rn_lfrelax, rn_tensile 222 224 !!------------------------------------------------------------------- 223 225 ! … … 242 244 WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat 243 245 WRITE(numout,*) ' Landfast: param from Lemieux 2016 ln_landfast_L16 = ', ln_landfast_L16 244 WRITE(numout,*) ' Landfast: param from home made ln_landfast_home= ', ln_landfast_home245 246 WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_depfra = ', rn_depfra 246 247 WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr … … 269 270 ENDIF 270 271 ! !--- Landfast ice 271 IF( .NOT.ln_landfast_L16 .AND. .NOT.ln_landfast_home ) tau_icebfr(:,:) = 0._wp 272 ! 273 IF ( ln_landfast_L16 .AND. ln_landfast_home ) THEN 274 CALL ctl_stop( 'ice_dyn_init: choose one and only one landfast parameterization (ln_landfast_L16 or ln_landfast_home)' ) 275 ENDIF 272 IF( .NOT.ln_landfast_L16 ) tau_icebfr(:,:) = 0._wp 276 273 ! 277 274 CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_adv.F90
r11348 r11413 100 100 diag_trp_vi(:,:) = SUM( v_i (:,:,:) - v_i_b (:,:,:) , dim=3 ) * r1_rdtice 101 101 diag_trp_vs(:,:) = SUM( v_s (:,:,:) - v_s_b (:,:,:) , dim=3 ) * r1_rdtice 102 IF( iom_use('icemtrp') ) CALL iom_put( "icemtrp" ,diag_trp_vi * rhoi ) ! ice mass transport103 IF( iom_use('snwmtrp') ) CALL iom_put( "snwmtrp" ,diag_trp_vs * rhos ) ! snw mass transport104 IF( iom_use('salmtrp') ) CALL iom_put( "salmtrp" ,diag_trp_sv * rhoi * 1.e-03 ) ! salt mass transport (kg/m2/s)105 IF( iom_use('dihctrp') ) CALL iom_put( "dihctrp" , -diag_trp_ei) ! advected ice heat content (W/m2)106 IF( iom_use('dshctrp') ) CALL iom_put( "dshctrp" , -diag_trp_es) ! advected snw heat content (W/m2)102 IF( iom_use('icemtrp') ) CALL iom_put( 'icemtrp' , diag_trp_vi * rhoi ) ! ice mass transport 103 IF( iom_use('snwmtrp') ) CALL iom_put( 'snwmtrp' , diag_trp_vs * rhos ) ! snw mass transport 104 IF( iom_use('salmtrp') ) CALL iom_put( 'salmtrp' , diag_trp_sv * rhoi * 1.e-03 ) ! salt mass transport (kg/m2/s) 105 IF( iom_use('dihctrp') ) CALL iom_put( 'dihctrp' , -diag_trp_ei ) ! advected ice heat content (W/m2) 106 IF( iom_use('dshctrp') ) CALL iom_put( 'dshctrp' , -diag_trp_es ) ! advected snw heat content (W/m2) 107 107 108 108 ! controls -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_rhg.F90
r11348 r11413 69 69 WRITE(numout,*)'ice_dyn_rhg: sea-ice rheology' 70 70 WRITE(numout,*)'~~~~~~~~~~~' 71 ENDIF72 !73 IF( ln_landfast_home ) THEN !-- Landfast ice parameterization74 tau_icebfr(:,:) = 0._wp75 DO jl = 1, jpl76 WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_depfra ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr77 END DO78 71 ENDIF 79 72 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icedyn_rhg_evp.F90
r10891 r11413 112 112 REAL(wp), DIMENSION(:,:), INTENT( out) :: pshear_i , pdivu_i , pdelta_i ! 113 113 !! 114 LOGICAL, PARAMETER :: ll_bdy_substep = .TRUE. ! temporary option to call bdy at each sub-time step (T)115 ! or only at the main time step (F)116 114 INTEGER :: ji, jj ! dummy loop indices 117 115 INTEGER :: jter ! local integers … … 137 135 ! 138 136 REAL(wp), DIMENSION(jpi,jpj) :: zdt_m ! (dt / ice-snow_mass) on T points 139 REAL(wp), DIMENSION(jpi,jpj) :: zaU , zaV! ice fraction on U/V points137 REAL(wp), DIMENSION(jpi,jpj) :: zaU , zaV ! ice fraction on U/V points 140 138 REAL(wp), DIMENSION(jpi,jpj) :: zmU_t, zmV_t ! (ice-snow_mass / dt) on U/V points 141 139 REAL(wp), DIMENSION(jpi,jpj) :: zmf ! coriolis parameter at T points 142 REAL(wp), DIMENSION(jpi,jpj) :: zTauU_ia , ztauV_ia ! ice-atm. stress at U-V points143 REAL(wp), DIMENSION(jpi,jpj) :: zTauU_ib , ztauV_ib ! ice-bottom stress at U-V points (landfast param)144 REAL(wp), DIMENSION(jpi,jpj) :: zspgU , zspgV ! surface pressure gradient at U/V points145 140 REAL(wp), DIMENSION(jpi,jpj) :: v_oceU, u_oceV, v_iceU, u_iceV ! ocean/ice u/v component on V/U points 146 REAL(wp), DIMENSION(jpi,jpj) :: zfU , zfV ! internal stresses147 141 ! 148 142 REAL(wp), DIMENSION(jpi,jpj) :: zds ! shear … … 152 146 ! ! ocean surface (ssh_m) if ice is not embedded 153 147 ! ! ice bottom surface if ice is embedded 154 REAL(wp), DIMENSION(jpi,jpj) :: zCorx, zCory ! Coriolis stress array 155 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_oi, ztauy_oi ! Ocean-to-ice stress array 156 ! 157 REAL(wp), DIMENSION(jpi,jpj) :: zswitchU, zswitchV ! dummy arrays 158 REAL(wp), DIMENSION(jpi,jpj) :: zmaskU, zmaskV ! mask for ice presence 148 REAL(wp), DIMENSION(jpi,jpj) :: zfU , zfV ! internal stresses 149 REAL(wp), DIMENSION(jpi,jpj) :: zspgU, zspgV ! surface pressure gradient at U/V points 150 REAL(wp), DIMENSION(jpi,jpj) :: zCorU, zCorV ! Coriolis stress array 151 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_ai, ztauy_ai ! ice-atm. stress at U-V points 152 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_oi, ztauy_oi ! ice-ocean stress at U-V points 153 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_bi, ztauy_bi ! ice-OceanBottom stress at U-V points (landfast) 154 REAL(wp), DIMENSION(jpi,jpj) :: ztaux_base, ztauy_base ! ice-bottom stress at U-V points (landfast) 155 ! 156 REAL(wp), DIMENSION(jpi,jpj) :: zmsk01x, zmsk01y ! dummy arrays 157 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00x, zmsk00y ! mask for ice presence 159 158 REAL(wp), DIMENSION(jpi,jpj) :: zfmask, zwf ! mask at F points for the ice 160 159 … … 163 162 REAL(wp), PARAMETER :: zamin = 0.001_wp ! ice concentration below which ice velocity becomes very small 164 163 !! --- diags 165 REAL(wp), DIMENSION(jpi,jpj) :: z swi164 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00 166 165 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zsig1, zsig2, zsig3 167 166 !! --- SIMIP diags 168 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_sig1 ! Average normal stress in sea ice169 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_sig2 ! Maximum shear stress in sea ice170 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_dssh_dx ! X-direction sea-surface tilt term (N/m2)171 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_dssh_dy ! X-direction sea-surface tilt term (N/m2)172 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_corstrx ! X-direction coriolis stress (N/m2)173 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_corstry ! Y-direction coriolis stress (N/m2)174 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_intstrx ! X-direction internal stress (N/m2)175 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_intstry ! Y-direction internal stress (N/m2)176 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_utau_oi ! X-direction ocean-ice stress177 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_vtau_oi ! Y-direction ocean-ice stress178 167 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_xmtrp_ice ! X-component of ice mass transport (kg/s) 179 168 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdiag_ymtrp_ice ! Y-component of ice mass transport (kg/s) … … 264 253 265 254 ! landfast param from Lemieux(2016): add isotropic tensile strength (following Konig Beatty and Holland, 2010) 266 IF( ln_landfast_L16 .OR. ln_landfast_home) THEN ; zkt = rn_tensile267 ELSE 255 IF( ln_landfast_L16 ) THEN ; zkt = rn_tensile 256 ELSE ; zkt = 0._wp 268 257 ENDIF 269 258 ! … … 308 297 309 298 ! Drag ice-atm. 310 z TauU_ia(ji,jj) = zaU(ji,jj) * utau_ice(ji,jj)311 z TauV_ia(ji,jj) = zaV(ji,jj) * vtau_ice(ji,jj)299 ztaux_ai(ji,jj) = zaU(ji,jj) * utau_ice(ji,jj) 300 ztauy_ai(ji,jj) = zaV(ji,jj) * vtau_ice(ji,jj) 312 301 313 302 ! Surface pressure gradient (- m*g*GRAD(ssh)) at U-V points … … 316 305 317 306 ! masks 318 zm askU(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassU ) ) ! 0 if no ice319 zm askV(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassV ) ) ! 0 if no ice307 zmsk00x(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassU ) ) ! 0 if no ice 308 zmsk00y(ji,jj) = 1._wp - MAX( 0._wp, SIGN( 1._wp, -zmassV ) ) ! 0 if no ice 320 309 321 310 ! switches 322 IF( zmassU <= zmmin .AND. zaU(ji,jj) <= zamin ) THEN ; z switchU(ji,jj) = 0._wp323 ELSE ; z switchU(ji,jj) = 1._wp ; ENDIF324 IF( zmassV <= zmmin .AND. zaV(ji,jj) <= zamin ) THEN ; z switchV(ji,jj) = 0._wp325 ELSE ; z switchV(ji,jj) = 1._wp ; ENDIF311 IF( zmassU <= zmmin .AND. zaU(ji,jj) <= zamin ) THEN ; zmsk01x(ji,jj) = 0._wp 312 ELSE ; zmsk01x(ji,jj) = 1._wp ; ENDIF 313 IF( zmassV <= zmmin .AND. zaV(ji,jj) <= zamin ) THEN ; zmsk01y(ji,jj) = 0._wp 314 ELSE ; zmsk01y(ji,jj) = 1._wp ; ENDIF 326 315 327 316 END DO … … 339 328 ! ice-bottom stress at U points 340 329 zvCr = zaU(ji,jj) * rn_depfra * hu_n(ji,jj) 341 z TauU_ib(ji,jj) =rn_icebfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) )330 ztaux_base(ji,jj) = - rn_icebfr * MAX( 0._wp, zvU - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaU(ji,jj) ) ) 342 331 ! ice-bottom stress at V points 343 332 zvCr = zaV(ji,jj) * rn_depfra * hv_n(ji,jj) 344 z TauV_ib(ji,jj) =rn_icebfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) )333 ztauy_base(ji,jj) = - rn_icebfr * MAX( 0._wp, zvV - zvCr ) * EXP( -rn_crhg * ( 1._wp - zaV(ji,jj) ) ) 345 334 ! ice_bottom stress at T points 346 335 zvCr = at_i(ji,jj) * rn_depfra * ht_n(ji,jj) 347 tau_icebfr(ji,jj) = rn_icebfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) )336 tau_icebfr(ji,jj) = - rn_icebfr * MAX( 0._wp, vt_i(ji,jj) - zvCr ) * EXP( -rn_crhg * ( 1._wp - at_i(ji,jj) ) ) 348 337 END DO 349 338 END DO 350 339 CALL lbc_lnk( 'icedyn_rhg_evp', tau_icebfr(:,:), 'T', 1. ) 351 340 ! 352 ELSE IF( ln_landfast_home ) THEN !-- Home made341 ELSE !-- no landfast 353 342 DO jj = 2, jpjm1 354 343 DO ji = fs_2, fs_jpim1 355 zTauU_ib(ji,jj) = tau_icebfr(ji,jj) 356 zTauV_ib(ji,jj) = tau_icebfr(ji,jj) 357 END DO 358 END DO 359 ! 360 ELSE !-- no landfast 361 DO jj = 2, jpjm1 362 DO ji = fs_2, fs_jpim1 363 zTauU_ib(ji,jj) = 0._wp 364 zTauV_ib(ji,jj) = 0._wp 344 ztaux_base(ji,jj) = 0._wp 345 ztauy_base(ji,jj) = 0._wp 365 346 END DO 366 347 END DO 367 348 ENDIF 368 IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr(:,:) )369 349 370 350 !------------------------------------------------------------------------------! … … 372 352 !------------------------------------------------------------------------------! 373 353 ! 374 ! ! ----------------------!354 ! ! ==================== ! 375 355 DO jter = 1 , nn_nevp ! loop over jter ! 376 ! ! ----------------------!356 ! ! ==================== ! 377 357 l_full_nf_update = jter == nn_nevp ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 378 358 ! … … 504 484 ! !--- tau_bottom/v_ice 505 485 zvel = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 506 zTauB = - zTauV_ib(ji,jj) / zvel 486 zTauB = ztauy_base(ji,jj) / zvel 487 ! !--- OceanBottom-to-Ice stress 488 ztauy_bi(ji,jj) = zTauB * v_ice(ji,jj) 507 489 ! 508 490 ! !--- Coriolis at V-points (energy conserving formulation) 509 zCor y(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * &491 zCorV(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * & 510 492 & ( zmf(ji,jj ) * ( e2u(ji,jj ) * u_ice(ji,jj ) + e2u(ji-1,jj ) * u_ice(ji-1,jj ) ) & 511 493 & + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 512 494 ! 513 495 ! !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 514 zTauE = zfV(ji,jj) + z TauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj)496 zTauE = zfV(ji,jj) + ztauy_ai(ji,jj) + zCorV(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 515 497 ! 516 498 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 517 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )499 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztauy_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 518 500 ! 519 501 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 520 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )& ! previous velocity521 & + zTauE + zTauO * v_ice(ji,jj)& ! F + tau_ia + Coriolis + spg + tau_io(only ocean part)522 & )/ MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast523 &+ ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0524 & ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin525 & ) * zmaskV(ji,jj)502 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) ) & ! previous velocity 503 & + zTauE + zTauO * v_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 504 & / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 505 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 506 & ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 507 & ) * zmsk00y(ji,jj) 526 508 ELSE !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 527 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * v_ice(ji,jj) &! previous velocity528 & + zTauE + zTauO * v_ice(ji,jj) &! F + tau_ia + Coriolis + spg + tau_io(only ocean part)529 & ) / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB ) &! m/dt + tau_io(only ice part) + landfast530 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) &! static friction => slow decrease to v=0531 & ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) ) &! v_ice = v_oce/100 if mass < zmmin & conc < zamin532 & ) * zmaskV(ji,jj)509 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * v_ice(ji,jj) & ! previous velocity 510 & + zTauE + zTauO * v_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 511 & / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 512 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 513 & ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 514 & ) * zmsk00y(ji,jj) 533 515 ENDIF 534 516 END DO … … 540 522 CALL agrif_interp_ice( 'V' ) 541 523 #endif 542 IF( ln_bdy .AND. ll_bdy_substep )CALL bdy_ice_dyn( 'V' )524 IF( ln_bdy ) CALL bdy_ice_dyn( 'V' ) 543 525 ! 544 526 DO jj = 2, jpjm1 … … 552 534 ! !--- tau_bottom/u_ice 553 535 zvel = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 554 zTauB = - zTauU_ib(ji,jj) / zvel 536 zTauB = ztaux_base(ji,jj) / zvel 537 ! !--- OceanBottom-to-Ice stress 538 ztaux_bi(ji,jj) = zTauB * u_ice(ji,jj) 555 539 ! 556 540 ! !--- Coriolis at U-points (energy conserving formulation) 557 zCor x(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * &541 zCorU(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * & 558 542 & ( zmf(ji ,jj) * ( e1v(ji ,jj) * v_ice(ji ,jj) + e1v(ji ,jj-1) * v_ice(ji ,jj-1) ) & 559 543 & + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 560 544 ! 561 545 ! !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 562 zTauE = zfU(ji,jj) + z TauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj)546 zTauE = zfU(ji,jj) + ztaux_ai(ji,jj) + zCorU(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 563 547 ! 564 548 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 565 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )549 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztaux_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 566 550 ! 567 551 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 568 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )& ! previous velocity569 & + zTauE + zTauO * u_ice(ji,jj)& ! F + tau_ia + Coriolis + spg + tau_io(only ocean part)570 & )/ MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast571 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )& ! static friction => slow decrease to v=0572 & ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin573 & ) * zmaskU(ji,jj)552 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) ) & ! previous velocity 553 & + zTauE + zTauO * u_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 554 & / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 555 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 556 & ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 557 & ) * zmsk00x(ji,jj) 574 558 ELSE !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 575 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * u_ice(ji,jj) &! previous velocity576 & + zTauE + zTauO * u_ice(ji,jj) &! F + tau_ia + Coriolis + spg + tau_io(only ocean part)577 & ) / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB ) &! m/dt + tau_io(only ice part) + landfast578 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) &! static friction => slow decrease to v=0579 & ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) ) &! v_ice = v_oce/100 if mass < zmmin & conc < zamin580 & ) * zmaskU(ji,jj)559 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * u_ice(ji,jj) & ! previous velocity 560 & + zTauE + zTauO * u_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 561 & / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 562 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 563 & ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 564 & ) * zmsk00x(ji,jj) 581 565 ENDIF 582 566 END DO … … 588 572 CALL agrif_interp_ice( 'U' ) 589 573 #endif 590 IF( ln_bdy .AND. ll_bdy_substep )CALL bdy_ice_dyn( 'U' )574 IF( ln_bdy ) CALL bdy_ice_dyn( 'U' ) 591 575 ! 592 576 ELSE ! odd iterations … … 602 586 ! !--- tau_bottom/u_ice 603 587 zvel = 5.e-05_wp + SQRT( v_iceU(ji,jj) * v_iceU(ji,jj) + u_ice(ji,jj) * u_ice(ji,jj) ) 604 zTauB = - zTauU_ib(ji,jj) / zvel 588 zTauB = ztaux_base(ji,jj) / zvel 589 ! !--- OceanBottom-to-Ice stress 590 ztaux_bi(ji,jj) = zTauB * u_ice(ji,jj) 605 591 ! 606 592 ! !--- Coriolis at U-points (energy conserving formulation) 607 zCor x(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * &593 zCorU(ji,jj) = 0.25_wp * r1_e1u(ji,jj) * & 608 594 & ( zmf(ji ,jj) * ( e1v(ji ,jj) * v_ice(ji ,jj) + e1v(ji ,jj-1) * v_ice(ji ,jj-1) ) & 609 595 & + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 610 596 ! 611 597 ! !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 612 zTauE = zfU(ji,jj) + z TauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj)598 zTauE = zfU(ji,jj) + ztaux_ai(ji,jj) + zCorU(ji,jj) + zspgU(ji,jj) + ztaux_oi(ji,jj) 613 599 ! 614 600 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 615 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE - zTauU_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )601 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, ztauE + ztaux_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 616 602 ! 617 603 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 618 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) )& ! previous velocity619 & + zTauE + zTauO * u_ice(ji,jj)& ! F + tau_ia + Coriolis + spg + tau_io(only ocean part)620 & )/ MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast621 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax )& ! static friction => slow decrease to v=0622 & ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin623 & ) * zmaskU(ji,jj)604 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * ( zbeta(ji,jj) * u_ice(ji,jj) + u_ice_b(ji,jj) ) & ! previous velocity 605 & + zTauE + zTauO * u_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 606 & / MAX( zepsi, zmU_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 607 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 608 & ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 609 & ) * zmsk00x(ji,jj) 624 610 ELSE !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 625 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * u_ice(ji,jj) &! previous velocity626 & + zTauE + zTauO * u_ice(ji,jj) &! F + tau_ia + Coriolis + spg + tau_io(only ocean part)627 & ) / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB ) &! m/dt + tau_io(only ice part) + landfast628 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) &! static friction => slow decrease to v=0629 & ) * zswitchU(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchU(ji,jj) ) &! v_ice = v_oce/100 if mass < zmmin & conc < zamin630 & ) * zmaskU(ji,jj)611 u_ice(ji,jj) = ( ( rswitch * ( zmU_t(ji,jj) * u_ice(ji,jj) & ! previous velocity 612 & + zTauE + zTauO * u_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 613 & / MAX( zepsi, zmU_t(ji,jj) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 614 & + ( 1._wp - rswitch ) * u_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 615 & ) * zmsk01x(ji,jj) + u_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01x(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 616 & ) * zmsk00x(ji,jj) 631 617 ENDIF 632 618 END DO … … 638 624 CALL agrif_interp_ice( 'U' ) 639 625 #endif 640 IF( ln_bdy .AND. ll_bdy_substep )CALL bdy_ice_dyn( 'U' )626 IF( ln_bdy ) CALL bdy_ice_dyn( 'U' ) 641 627 ! 642 628 DO jj = 2, jpjm1 … … 650 636 ! !--- tau_bottom/v_ice 651 637 zvel = 5.e-05_wp + SQRT( v_ice(ji,jj) * v_ice(ji,jj) + u_iceV(ji,jj) * u_iceV(ji,jj) ) 652 zTauB = - zTauV_ib(ji,jj) / zvel 638 zTauB = ztauy_base(ji,jj) / zvel 639 ! !--- OceanBottom-to-Ice stress 640 ztauy_bi(ji,jj) = zTauB * v_ice(ji,jj) 653 641 ! 654 642 ! !--- Coriolis at v-points (energy conserving formulation) 655 zCor y(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * &643 zCorV(ji,jj) = - 0.25_wp * r1_e2v(ji,jj) * & 656 644 & ( zmf(ji,jj ) * ( e2u(ji,jj ) * u_ice(ji,jj ) + e2u(ji-1,jj ) * u_ice(ji-1,jj ) ) & 657 645 & + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 658 646 ! 659 647 ! !--- Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 660 zTauE = zfV(ji,jj) + z TauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj)648 zTauE = zfV(ji,jj) + ztauy_ai(ji,jj) + zCorV(ji,jj) + zspgV(ji,jj) + ztauy_oi(ji,jj) 661 649 ! 662 650 ! !--- landfast switch => 0 = static friction ; 1 = sliding friction 663 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE - zTauV_ib(ji,jj) ) - SIGN( 1._wp, zTauE ) ) )651 rswitch = 1._wp - MIN( 1._wp, ABS( SIGN( 1._wp, zTauE + ztauy_base(ji,jj) ) - SIGN( 1._wp, zTauE ) ) ) 664 652 ! 665 653 IF( ln_aEVP ) THEN !--- ice velocity using aEVP (Kimmritz et al 2016 & 2017) 666 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) )& ! previous velocity667 & + zTauE + zTauO * v_ice(ji,jj)& ! F + tau_ia + Coriolis + spg + tau_io(only ocean part)668 & )/ MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast669 &+ ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0670 & ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin671 & ) * zmaskV(ji,jj)654 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * ( zbeta(ji,jj) * v_ice(ji,jj) + v_ice_b(ji,jj) ) & ! previous velocity 655 & + zTauE + zTauO * v_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 656 & / MAX( zepsi, zmV_t(ji,jj) * ( zbeta(ji,jj) + 1._wp ) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 657 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 658 & ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 659 & ) * zmsk00y(ji,jj) 672 660 ELSE !--- ice velocity using EVP implicit formulation (cf Madec doc & Bouillon 2009) 673 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * v_ice(ji,jj) &! previous velocity674 & + zTauE + zTauO * v_ice(ji,jj) &! F + tau_ia + Coriolis + spg + tau_io(only ocean part)675 & ) / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB ) &! m/dt + tau_io(only ice part) + landfast676 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) &! static friction => slow decrease to v=0677 & ) * zswitchV(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zswitchV(ji,jj) ) &! v_ice = v_oce/100 if mass < zmmin & conc < zamin678 & ) * zmaskV(ji,jj)661 v_ice(ji,jj) = ( ( rswitch * ( zmV_t(ji,jj) * v_ice(ji,jj) & ! previous velocity 662 & + zTauE + zTauO * v_ice(ji,jj) ) & ! F + tau_ia + Coriolis + spg + tau_io(only ocean part) 663 & / MAX( zepsi, zmV_t(ji,jj) + zTauO - zTauB ) & ! m/dt + tau_io(only ice part) + landfast 664 & + ( 1._wp - rswitch ) * v_ice(ji,jj) * MAX( 0._wp, 1._wp - zdtevp * rn_lfrelax ) & ! static friction => slow decrease to v=0 665 & ) * zmsk01y(ji,jj) + v_oce(ji,jj) * 0.01_wp * ( 1._wp - zmsk01y(ji,jj) ) & ! v_ice = v_oce/100 if mass < zmmin & conc < zamin 666 & ) * zmsk00y(ji,jj) 679 667 ENDIF 680 668 END DO … … 686 674 CALL agrif_interp_ice( 'V' ) 687 675 #endif 688 IF( ln_bdy .AND. ll_bdy_substep )CALL bdy_ice_dyn( 'V' )676 IF( ln_bdy ) CALL bdy_ice_dyn( 'V' ) 689 677 ! 690 678 ENDIF … … 701 689 END DO ! end loop over jter ! 702 690 ! ! ==================== ! 703 !704 IF( ln_bdy .AND. .NOT.ll_bdy_substep ) THEN705 CALL bdy_ice_dyn( 'U' )706 CALL bdy_ice_dyn( 'V' )707 ENDIF708 691 ! 709 692 !------------------------------------------------------------------------------! … … 764 747 DO jj = 1, jpj 765 748 DO ji = 1, jpi 766 z swi(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice749 zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 767 750 END DO 768 751 END DO 769 752 753 ! --- ice-ocean, ice-atm. & ice-oceanbottom(landfast) stresses --- ! 754 IF( iom_use('utau_oi') .OR. iom_use('vtau_oi') .OR. iom_use('utau_ai') .OR. iom_use('vtau_ai') .OR. & 755 & iom_use('utau_bi') .OR. iom_use('vtau_bi') ) THEN 756 ! 757 CALL lbc_lnk_multi( 'icedyn_rhg_evp', ztaux_oi, 'U', -1., ztauy_oi, 'V', -1., ztaux_ai, 'U', -1., ztauy_ai, 'V', -1., & 758 & ztaux_bi, 'U', -1., ztauy_bi, 'V', -1. ) 759 ! 760 CALL iom_put( 'utau_oi' , ztaux_oi * zmsk00 ) 761 CALL iom_put( 'vtau_oi' , ztauy_oi * zmsk00 ) 762 CALL iom_put( 'utau_ai' , ztaux_ai * zmsk00 ) 763 CALL iom_put( 'vtau_ai' , ztauy_ai * zmsk00 ) 764 CALL iom_put( 'utau_bi' , ztaux_bi * zmsk00 ) 765 CALL iom_put( 'vtau_bi' , ztauy_bi * zmsk00 ) 766 ENDIF 767 770 768 ! --- divergence, shear and strength --- ! 771 IF( iom_use('icediv') ) CALL iom_put( "icediv" , pdivu_i (:,:) * zswi(:,:)) ! divergence772 IF( iom_use('iceshe') ) CALL iom_put( "iceshe" , pshear_i(:,:) * zswi(:,:)) ! shear773 IF( iom_use('icestr') ) CALL iom_put( "icestr" , strength(:,:) * zswi(:,:) ) ! Icestrength774 775 ! --- charge ellipse--- !776 IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') ) THEN769 IF( iom_use('icediv') ) CALL iom_put( 'icediv' , pdivu_i * zmsk00 ) ! divergence 770 IF( iom_use('iceshe') ) CALL iom_put( 'iceshe' , pshear_i * zmsk00 ) ! shear 771 IF( iom_use('icestr') ) CALL iom_put( 'icestr' , strength * zmsk00 ) ! strength 772 773 ! --- stress tensor --- ! 774 IF( iom_use('isig1') .OR. iom_use('isig2') .OR. iom_use('isig3') .OR. iom_use('normstr') .OR. iom_use('sheastr') ) THEN 777 775 ! 778 776 ALLOCATE( zsig1(jpi,jpj) , zsig2(jpi,jpj) , zsig3(jpi,jpj) ) … … 780 778 DO jj = 2, jpjm1 781 779 DO ji = 2, jpim1 782 zdum1 = ( z swi(ji-1,jj) * pstress12_i(ji-1,jj) + zswi(ji ,jj-1) * pstress12_i(ji ,jj-1) + & ! stress12_i at T-point783 & z swi(ji ,jj) * pstress12_i(ji ,jj) + zswi(ji-1,jj-1) * pstress12_i(ji-1,jj-1) ) &784 & / MAX( 1._wp, z swi(ji-1,jj) + zswi(ji,jj-1) + zswi(ji,jj) + zswi(ji-1,jj-1) )780 zdum1 = ( zmsk00(ji-1,jj) * pstress12_i(ji-1,jj) + zmsk00(ji ,jj-1) * pstress12_i(ji ,jj-1) + & ! stress12_i at T-point 781 & zmsk00(ji ,jj) * pstress12_i(ji ,jj) + zmsk00(ji-1,jj-1) * pstress12_i(ji-1,jj-1) ) & 782 & / MAX( 1._wp, zmsk00(ji-1,jj) + zmsk00(ji,jj-1) + zmsk00(ji,jj) + zmsk00(ji-1,jj-1) ) 785 783 786 784 zshear = SQRT( pstress2_i(ji,jj) * pstress2_i(ji,jj) + 4._wp * zdum1 * zdum1 ) ! shear stress 787 785 788 zdum2 = z swi(ji,jj) / MAX( 1._wp, strength(ji,jj) )786 zdum2 = zmsk00(ji,jj) / MAX( 1._wp, strength(ji,jj) ) 789 787 790 788 !! zsig1(ji,jj) = 0.5_wp * zdum2 * ( pstress1_i(ji,jj) + zshear ) ! principal stress (y-direction, see Hunke & Dukowicz 2002) … … 799 797 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zsig1, 'T', 1., zsig2, 'T', 1., zsig3, 'T', 1. ) 800 798 ! 801 IF( iom_use('isig1') ) CALL iom_put( "isig1" , zsig1 ) 802 IF( iom_use('isig2') ) CALL iom_put( "isig2" , zsig2 ) 803 IF( iom_use('isig3') ) CALL iom_put( "isig3" , zsig3 ) 804 ! 799 CALL iom_put( 'isig1' , zsig1 ) 800 CALL iom_put( 'isig2' , zsig2 ) 801 CALL iom_put( 'isig3' , zsig3 ) 802 ! 803 ! Stress tensor invariants (normal and shear stress N/m) 804 IF( iom_use('normstr') ) CALL iom_put( 'normstr' , ( zs1(:,:) + zs2(:,:) ) * zmsk00(:,:) ) ! Normal stress 805 IF( iom_use('sheastr') ) CALL iom_put( 'sheastr' , SQRT( ( zs1(:,:) - zs2(:,:) )**2 + 4*zs12(:,:)**2 ) * zmsk00(:,:) ) ! Shear stress 806 805 807 DEALLOCATE( zsig1 , zsig2 , zsig3 ) 806 808 ENDIF 807 809 808 810 ! --- SIMIP --- ! 809 IF ( iom_use( 'normstr' ) .OR. iom_use( 'sheastr' ) .OR. iom_use( 'dssh_dx' ) .OR. iom_use( 'dssh_dy' ) .OR. & 810 & iom_use( 'corstrx' ) .OR. iom_use( 'corstry' ) .OR. iom_use( 'intstrx' ) .OR. iom_use( 'intstry' ) .OR. & 811 & iom_use( 'utau_oi' ) .OR. iom_use( 'vtau_oi' ) .OR. iom_use( 'xmtrpice' ) .OR. iom_use( 'ymtrpice' ) .OR. & 812 & iom_use( 'xmtrpsnw' ) .OR. iom_use( 'ymtrpsnw' ) .OR. iom_use( 'xatrp' ) .OR. iom_use( 'yatrp' ) ) THEN 813 814 ALLOCATE( zdiag_sig1 (jpi,jpj) , zdiag_sig2 (jpi,jpj) , zdiag_dssh_dx (jpi,jpj) , zdiag_dssh_dy (jpi,jpj) , & 815 & zdiag_corstrx (jpi,jpj) , zdiag_corstry (jpi,jpj) , zdiag_intstrx (jpi,jpj) , zdiag_intstry (jpi,jpj) , & 816 & zdiag_utau_oi (jpi,jpj) , zdiag_vtau_oi (jpi,jpj) , zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) , & 817 & zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp (jpi,jpj) , zdiag_yatrp (jpi,jpj) ) 818 811 IF( iom_use('dssh_dx') .OR. iom_use('dssh_dy') .OR. & 812 & iom_use('corstrx') .OR. iom_use('corstry') .OR. iom_use('intstrx') .OR. iom_use('intstry') ) THEN 813 ! 814 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zspgU, 'U', -1., zspgV, 'V', -1., & 815 & zCorU, 'U', -1., zCorV, 'V', -1., zfU, 'U', -1., zfV, 'V', -1. ) 816 817 CALL iom_put( 'dssh_dx' , zspgU * zmsk00 ) ! Sea-surface tilt term in force balance (x) 818 CALL iom_put( 'dssh_dy' , zspgV * zmsk00 ) ! Sea-surface tilt term in force balance (y) 819 CALL iom_put( 'corstrx' , zCorU * zmsk00 ) ! Coriolis force term in force balance (x) 820 CALL iom_put( 'corstry' , zCorV * zmsk00 ) ! Coriolis force term in force balance (y) 821 CALL iom_put( 'intstrx' , zfU * zmsk00 ) ! Internal force term in force balance (x) 822 CALL iom_put( 'intstry' , zfV * zmsk00 ) ! Internal force term in force balance (y) 823 ENDIF 824 825 IF( iom_use('xmtrpice') .OR. iom_use('ymtrpice') .OR. & 826 & iom_use('xmtrpsnw') .OR. iom_use('ymtrpsnw') .OR. iom_use('xatrp') .OR. iom_use('yatrp') ) THEN 827 ! 828 ALLOCATE( zdiag_xmtrp_ice(jpi,jpj) , zdiag_ymtrp_ice(jpi,jpj) , & 829 & zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp(jpi,jpj) , zdiag_yatrp(jpi,jpj) ) 830 ! 819 831 DO jj = 2, jpjm1 820 832 DO ji = 2, jpim1 821 rswitch = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice822 823 ! Stress tensor invariants (normal and shear stress N/m)824 zdiag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * rswitch ! normal stress825 zdiag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * rswitch ! shear stress826 827 ! Stress terms of the momentum equation (N/m2)828 zdiag_dssh_dx(ji,jj) = zspgU(ji,jj) * rswitch ! sea surface slope stress term829 zdiag_dssh_dy(ji,jj) = zspgV(ji,jj) * rswitch830 831 zdiag_corstrx(ji,jj) = zCorx(ji,jj) * rswitch ! Coriolis stress term832 zdiag_corstry(ji,jj) = zCory(ji,jj) * rswitch833 834 zdiag_intstrx(ji,jj) = zfU(ji,jj) * rswitch ! internal stress term835 zdiag_intstry(ji,jj) = zfV(ji,jj) * rswitch836 837 zdiag_utau_oi(ji,jj) = ztaux_oi(ji,jj) * rswitch ! oceanic stress838 zdiag_vtau_oi(ji,jj) = ztauy_oi(ji,jj) * rswitch839 840 833 ! 2D ice mass, snow mass, area transport arrays (X, Y) 841 zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * rswitch842 zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * rswitch843 834 zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj) 835 zfac_y = 0.5 * v_ice(ji,jj) * e1v(ji,jj) * zmsk00(ji,jj) 836 844 837 zdiag_xmtrp_ice(ji,jj) = rhoi * zfac_x * ( vt_i(ji+1,jj) + vt_i(ji,jj) ) ! ice mass transport, X-component 845 838 zdiag_ymtrp_ice(ji,jj) = rhoi * zfac_y * ( vt_i(ji,jj+1) + vt_i(ji,jj) ) ! '' Y- '' 846 839 847 840 zdiag_xmtrp_snw(ji,jj) = rhos * zfac_x * ( vt_s(ji+1,jj) + vt_s(ji,jj) ) ! snow mass transport, X-component 848 841 zdiag_ymtrp_snw(ji,jj) = rhos * zfac_y * ( vt_s(ji,jj+1) + vt_s(ji,jj) ) ! '' Y- '' 849 842 850 843 zdiag_xatrp(ji,jj) = zfac_x * ( at_i(ji+1,jj) + at_i(ji,jj) ) ! area transport, X-component 851 844 zdiag_yatrp(ji,jj) = zfac_y * ( at_i(ji,jj+1) + at_i(ji,jj) ) ! '' Y- '' 852 853 END DO 854 END DO 855 856 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_sig1 , 'T', 1., zdiag_sig2 , 'T', 1., & 857 & zdiag_dssh_dx, 'U', -1., zdiag_dssh_dy, 'V', -1., & 858 & zdiag_corstrx, 'U', -1., zdiag_corstry, 'V', -1., & 859 & zdiag_intstrx, 'U', -1., zdiag_intstry, 'V', -1. ) 860 861 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_utau_oi , 'U', -1., zdiag_vtau_oi , 'V', -1., & 862 & zdiag_xmtrp_ice, 'U', -1., zdiag_xmtrp_snw, 'U', -1., & 863 & zdiag_xatrp , 'U', -1., zdiag_ymtrp_ice, 'V', -1., & 864 & zdiag_ymtrp_snw, 'V', -1., zdiag_yatrp , 'V', -1. ) 865 866 IF( iom_use('normstr' ) ) CALL iom_put( 'normstr' , zdiag_sig1(:,:) ) ! Normal stress 867 IF( iom_use('sheastr' ) ) CALL iom_put( 'sheastr' , zdiag_sig2(:,:) ) ! Shear stress 868 IF( iom_use('dssh_dx' ) ) CALL iom_put( 'dssh_dx' , zdiag_dssh_dx(:,:) ) ! Sea-surface tilt term in force balance (x) 869 IF( iom_use('dssh_dy' ) ) CALL iom_put( 'dssh_dy' , zdiag_dssh_dy(:,:) ) ! Sea-surface tilt term in force balance (y) 870 IF( iom_use('corstrx' ) ) CALL iom_put( 'corstrx' , zdiag_corstrx(:,:) ) ! Coriolis force term in force balance (x) 871 IF( iom_use('corstry' ) ) CALL iom_put( 'corstry' , zdiag_corstry(:,:) ) ! Coriolis force term in force balance (y) 872 IF( iom_use('intstrx' ) ) CALL iom_put( 'intstrx' , zdiag_intstrx(:,:) ) ! Internal force term in force balance (x) 873 IF( iom_use('intstry' ) ) CALL iom_put( 'intstry' , zdiag_intstry(:,:) ) ! Internal force term in force balance (y) 874 IF( iom_use('utau_oi' ) ) CALL iom_put( 'utau_oi' , zdiag_utau_oi(:,:) ) ! Ocean stress term in force balance (x) 875 IF( iom_use('vtau_oi' ) ) CALL iom_put( 'vtau_oi' , zdiag_vtau_oi(:,:) ) ! Ocean stress term in force balance (y) 876 IF( iom_use('xmtrpice') ) CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice(:,:) ) ! X-component of sea-ice mass transport (kg/s) 877 IF( iom_use('ymtrpice') ) CALL iom_put( 'ymtrpice' , zdiag_ymtrp_ice(:,:) ) ! Y-component of sea-ice mass transport 878 IF( iom_use('xmtrpsnw') ) CALL iom_put( 'xmtrpsnw' , zdiag_xmtrp_snw(:,:) ) ! X-component of snow mass transport (kg/s) 879 IF( iom_use('ymtrpsnw') ) CALL iom_put( 'ymtrpsnw' , zdiag_ymtrp_snw(:,:) ) ! Y-component of snow mass transport 880 IF( iom_use('xatrp' ) ) CALL iom_put( 'xatrp' , zdiag_xatrp(:,:) ) ! X-component of ice area transport 881 IF( iom_use('yatrp' ) ) CALL iom_put( 'yatrp' , zdiag_yatrp(:,:) ) ! Y-component of ice area transport 882 883 DEALLOCATE( zdiag_sig1 , zdiag_sig2 , zdiag_dssh_dx , zdiag_dssh_dy , & 884 & zdiag_corstrx , zdiag_corstry , zdiag_intstrx , zdiag_intstry , & 885 & zdiag_utau_oi , zdiag_vtau_oi , zdiag_xmtrp_ice , zdiag_ymtrp_ice , & 886 & zdiag_xmtrp_snw , zdiag_ymtrp_snw , zdiag_xatrp , zdiag_yatrp ) 845 846 END DO 847 END DO 848 849 CALL lbc_lnk_multi( 'icedyn_rhg_evp', zdiag_xmtrp_ice, 'U', -1., zdiag_ymtrp_ice, 'V', -1., & 850 & zdiag_xmtrp_snw, 'U', -1., zdiag_ymtrp_snw, 'V', -1., & 851 & zdiag_xatrp , 'U', -1., zdiag_yatrp , 'V', -1. ) 852 853 CALL iom_put( 'xmtrpice' , zdiag_xmtrp_ice ) ! X-component of sea-ice mass transport (kg/s) 854 CALL iom_put( 'ymtrpice' , zdiag_ymtrp_ice ) ! Y-component of sea-ice mass transport 855 CALL iom_put( 'xmtrpsnw' , zdiag_xmtrp_snw ) ! X-component of snow mass transport (kg/s) 856 CALL iom_put( 'ymtrpsnw' , zdiag_ymtrp_snw ) ! Y-component of snow mass transport 857 CALL iom_put( 'xatrp' , zdiag_xatrp ) ! X-component of ice area transport 858 CALL iom_put( 'yatrp' , zdiag_yatrp ) ! Y-component of ice area transport 859 860 DEALLOCATE( zdiag_xmtrp_ice , zdiag_ymtrp_ice , & 861 & zdiag_xmtrp_snw , zdiag_ymtrp_snw , zdiag_xatrp , zdiag_yatrp ) 887 862 888 863 ENDIF -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/iceistate.F90
r11348 r11413 22 22 USE eosbn2 ! equation of state 23 23 USE domvvl ! Variable volume 24 USE ice ! sea-ice variables 25 USE icevar ! ice_var_salprof 24 USE ice ! sea-ice: variables 25 USE ice1D ! sea-ice: thermodynamics variables 26 USE icetab ! sea-ice: 1D <==> 2D transformation 27 USE icevar ! sea-ice: operations 26 28 ! 27 29 USE in_out_manager ! I/O manager … … 36 38 PUBLIC ice_istate ! called by icestp.F90 37 39 PUBLIC ice_istate_init ! called by icestp.F90 38 39 INTEGER , PARAMETER :: jpfldi = 6 ! maximum number of files to read40 INTEGER , PARAMETER :: jp_hti = 1 ! index of ice thickness (m) at T-point41 INTEGER , PARAMETER :: jp_hts = 2 ! index of snow thicknes (m) at T-point42 INTEGER , PARAMETER :: jp_ati = 3 ! index of ice fraction (%) at T-point43 INTEGER , PARAMETER :: jp_tsu = 4 ! index of ice surface temp (K) at T-point44 INTEGER , PARAMETER :: jp_tmi = 5 ! index of ice temp at T-point45 INTEGER , PARAMETER :: jp_smi = 6 ! index of ice sali at T-point46 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: si ! structure of input fields (file informations, fields read)47 40 ! 48 41 ! !! ** namelist (namini) ** 49 LOGICAL :: ln_iceini ! initialization or not 50 LOGICAL :: ln_iceini_file ! Ice initialization state from 2D netcdf file 51 REAL(wp) :: rn_thres_sst ! threshold water temperature for initial sea ice 52 REAL(wp) :: rn_hts_ini_n ! initial snow thickness in the north 53 REAL(wp) :: rn_hts_ini_s ! initial snow thickness in the south 54 REAL(wp) :: rn_hti_ini_n ! initial ice thickness in the north 55 REAL(wp) :: rn_hti_ini_s ! initial ice thickness in the south 56 REAL(wp) :: rn_ati_ini_n ! initial leads area in the north 57 REAL(wp) :: rn_ati_ini_s ! initial leads area in the south 58 REAL(wp) :: rn_smi_ini_n ! initial salinity 59 REAL(wp) :: rn_smi_ini_s ! initial salinity 60 REAL(wp) :: rn_tmi_ini_n ! initial temperature 61 REAL(wp) :: rn_tmi_ini_s ! initial temperature 62 42 LOGICAL, PUBLIC :: ln_iceini !: Ice initialization or not 43 LOGICAL, PUBLIC :: ln_iceini_file !: Ice initialization from 2D netcdf file 44 REAL(wp) :: rn_thres_sst 45 REAL(wp) :: rn_hti_ini_n, rn_hts_ini_n, rn_ati_ini_n, rn_smi_ini_n, rn_tmi_ini_n, rn_tsu_ini_n, rn_tms_ini_n 46 REAL(wp) :: rn_hti_ini_s, rn_hts_ini_s, rn_ati_ini_s, rn_smi_ini_s, rn_tmi_ini_s, rn_tsu_ini_s, rn_tms_ini_s 47 REAL(wp) :: rn_apd_ini_n, rn_hpd_ini_n 48 REAL(wp) :: rn_apd_ini_s, rn_hpd_ini_s 49 ! 50 ! ! if ln_iceini_file = T 51 INTEGER , PARAMETER :: jpfldi = 9 ! maximum number of files to read 52 INTEGER , PARAMETER :: jp_hti = 1 ! index of ice thickness (m) 53 INTEGER , PARAMETER :: jp_hts = 2 ! index of snw thickness (m) 54 INTEGER , PARAMETER :: jp_ati = 3 ! index of ice fraction (-) 55 INTEGER , PARAMETER :: jp_smi = 4 ! index of ice salinity (g/kg) 56 INTEGER , PARAMETER :: jp_tmi = 5 ! index of ice temperature (K) 57 INTEGER , PARAMETER :: jp_tsu = 6 ! index of ice surface temp (K) 58 INTEGER , PARAMETER :: jp_tms = 7 ! index of snw temperature (K) 59 INTEGER , PARAMETER :: jp_apd = 8 ! index of pnd fraction (-) 60 INTEGER , PARAMETER :: jp_hpd = 9 ! index of pnd depth (m) 61 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: si ! structure of input fields (file informations, fields read) 62 ! 63 63 !!---------------------------------------------------------------------- 64 64 !! NEMO/ICE 4.0 , NEMO Consortium (2018) … … 68 68 CONTAINS 69 69 70 SUBROUTINE ice_istate 70 SUBROUTINE ice_istate( kt ) 71 71 !!------------------------------------------------------------------- 72 72 !! *** ROUTINE ice_istate *** … … 87 87 !! 88 88 !! ** Notes : o_i, t_su, t_s, t_i, sz_i must be filled everywhere, even 89 !! where there is no ice (clem: I do not know why, is it mandatory?)89 !! where there is no ice 90 90 !!-------------------------------------------------------------------- 91 INTEGER, INTENT(in) :: kt ! time step 92 !! 91 93 INTEGER :: ji, jj, jk, jl ! dummy loop indices 92 INTEGER :: i_hemis, i_fill, jl0 ! local integers 93 REAL(wp) :: ztmelts, zdh 94 REAL(wp) :: zarg, zV, zconv, zdv, zfac 94 REAL(wp) :: ztmelts 95 95 INTEGER , DIMENSION(4) :: itest 96 96 REAL(wp), DIMENSION(jpi,jpj) :: z2d 97 97 REAL(wp), DIMENSION(jpi,jpj) :: zswitch ! ice indicator 98 REAL(wp), DIMENSION(jpi,jpj) :: zht_i_ini, zat_i_ini, zvt_i_ini !data from namelist or nc file 99 REAL(wp), DIMENSION(jpi,jpj) :: zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file 100 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zh_i_ini , za_i_ini !data by cattegories to fill 98 REAL(wp), DIMENSION(jpi,jpj) :: zht_i_ini, zat_i_ini, ztm_s_ini !data from namelist or nc file 99 REAL(wp), DIMENSION(jpi,jpj) :: zt_su_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file 100 REAL(wp), DIMENSION(jpi,jpj) :: zapnd_ini, zhpnd_ini !data from namelist or nc file 101 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zti_3d , zts_3d !temporary arrays 102 !! 103 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zhi_2d, zhs_2d, zai_2d, zti_2d, zts_2d, ztsu_2d, zsi_2d 101 104 !-------------------------------------------------------------------- 102 105 … … 105 108 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 106 109 107 !-------------------------------------------------------------------- 108 ! 1) Set surface and bottom temperatures to initial values 109 !-------------------------------------------------------------------- 110 ! 111 ! init surface temperature 110 !--------------------------- 111 ! 1) 1st init. of the fields 112 !--------------------------- 113 ! 114 ! basal temperature (considered at freezing point) [Kelvin] 115 CALL eos_fzp( sss_m(:,:), t_bo(:,:) ) 116 t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) 117 ! 118 ! surface temperature and conductivity 112 119 DO jl = 1, jpl 113 120 t_su (:,:,jl) = rt0 * tmask(:,:,1) ! temp at the surface … … 115 122 END DO 116 123 ! 117 ! init basal temperature (considered at freezing point) [Kelvin] 118 CALL eos_fzp( sss_m(:,:), t_bo(:,:) ) 119 t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) 120 124 ! ice and snw temperatures 125 DO jl = 1, jpl 126 DO jk = 1, nlay_i 127 t_i(:,:,jk,jl) = rt0 * tmask(:,:,1) 128 END DO 129 DO jk = 1, nlay_s 130 t_s(:,:,jk,jl) = rt0 * tmask(:,:,1) 131 END DO 132 END DO 133 ! 134 ! specific temperatures for coupled runs 135 tn_ice (:,:,:) = t_i (:,:,1,:) 136 t1_ice (:,:,:) = t_i (:,:,1,:) 137 138 ! heat contents 139 e_i (:,:,:,:) = 0._wp 140 e_s (:,:,:,:) = 0._wp 141 142 ! general fields 143 a_i (:,:,:) = 0._wp 144 v_i (:,:,:) = 0._wp 145 v_s (:,:,:) = 0._wp 146 sv_i(:,:,:) = 0._wp 147 oa_i(:,:,:) = 0._wp 148 ! 149 h_i (:,:,:) = 0._wp 150 h_s (:,:,:) = 0._wp 151 s_i (:,:,:) = 0._wp 152 o_i (:,:,:) = 0._wp 153 ! 154 ! melt ponds 155 a_ip (:,:,:) = 0._wp 156 v_ip (:,:,:) = 0._wp 157 a_ip_frac(:,:,:) = 0._wp 158 h_ip (:,:,:) = 0._wp 159 ! 160 ! ice velocities 161 u_ice (:,:) = 0._wp 162 v_ice (:,:) = 0._wp 163 ! 164 !------------------------------------------------------------------------ 165 ! 2) overwrite some of the fields with namelist parameters or netcdf file 166 !------------------------------------------------------------------------ 121 167 IF( ln_iceini ) THEN 122 !-----------------------------------------------------------123 ! 2) Compute or read sea ice variables ===> single category124 !-----------------------------------------------------------125 !126 168 ! !---------------! 127 169 IF( ln_iceini_file )THEN ! Read a file ! 128 170 ! !---------------! 129 ! 130 zht_i_ini(:,:) = si(jp_hti)%fnow(:,:,1) 131 zht_s_ini(:,:) = si(jp_hts)%fnow(:,:,1) 132 zat_i_ini(:,:) = si(jp_ati)%fnow(:,:,1) 133 zts_u_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 134 ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 135 zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 136 ! 137 WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1) 138 ELSEWHERE ; zswitch(:,:) = 0._wp 171 WHERE( ff_t(:,:) >= 0._wp ) ; zswitch(:,:) = 1._wp 172 ELSEWHERE ; zswitch(:,:) = 0._wp 139 173 END WHERE 140 zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:) 141 ! 174 ! 175 CALL fld_read( kt, 1, si ) ! input fields provided at the current time-step 176 ! 177 ! -- mandatory fields -- ! 178 zht_i_ini(:,:) = si(jp_hti)%fnow(:,:,1) 179 zht_s_ini(:,:) = si(jp_hts)%fnow(:,:,1) 180 zat_i_ini(:,:) = si(jp_ati)%fnow(:,:,1) 181 182 ! -- optional fields -- ! 183 ! if fields do not exist then set them to the values present in the namelist (except for snow and surface temperature) 184 ! 185 ! ice salinity 186 IF( TRIM(si(jp_smi)%clrootname) == 'NOT USED' ) & 187 & si(jp_smi)%fnow(:,:,1) = ( rn_smi_ini_n * zswitch + rn_smi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 188 zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 189 ! 190 ! ice temperature 191 IF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) & 192 & si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 193 ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 194 ! 195 ! surface temperature => set to ice temperature if it exists 196 IF ( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 197 si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 198 ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 199 si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 200 ENDIF 201 zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 202 ! 203 ! snow temperature => set to ice temperature if it exists 204 IF ( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 205 si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 206 ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 207 si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 208 ENDIF 209 ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 210 ! 211 ! ponds 212 IF( TRIM(si(jp_apd)%clrootname) == 'NOT USED' ) & 213 & si(jp_apd)%fnow(:,:,1) = ( rn_apd_ini_n * zswitch + rn_apd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 214 zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 215 IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) & 216 & si(jp_hpd)%fnow(:,:,1) = ( rn_hpd_ini_n * zswitch + rn_hpd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 217 zhpnd_ini(:,:) = si(jp_hpd)%fnow(:,:,1) 218 ! 219 ! change the switch for the following 220 WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1) 221 ELSEWHERE ; zswitch(:,:) = 0._wp 222 END WHERE 142 223 ! !---------------! 143 224 ELSE ! Read namelist ! 144 225 ! !---------------! 145 ! no ice if sst <= t-freez + ttest226 ! no ice if (sst - Tfreez) >= thresold 146 227 WHERE( ( sst_m(:,:) - (t_bo(:,:) - rt0) ) * tmask(:,:,1) >= rn_thres_sst ) ; zswitch(:,:) = 0._wp 147 228 ELSEWHERE ; zswitch(:,:) = tmask(:,:,1) … … 153 234 zht_s_ini(:,:) = rn_hts_ini_n * zswitch(:,:) 154 235 zat_i_ini(:,:) = rn_ati_ini_n * zswitch(:,:) 155 zts_u_ini(:,:) = rn_tmi_ini_n * zswitch(:,:)156 236 zsm_i_ini(:,:) = rn_smi_ini_n * zswitch(:,:) 157 237 ztm_i_ini(:,:) = rn_tmi_ini_n * zswitch(:,:) 238 zt_su_ini(:,:) = rn_tsu_ini_n * zswitch(:,:) 239 ztm_s_ini(:,:) = rn_tms_ini_n * zswitch(:,:) 240 zapnd_ini(:,:) = rn_apd_ini_n * zswitch(:,:) 241 zhpnd_ini(:,:) = rn_hpd_ini_n * zswitch(:,:) 158 242 ELSEWHERE 159 243 zht_i_ini(:,:) = rn_hti_ini_s * zswitch(:,:) 160 244 zht_s_ini(:,:) = rn_hts_ini_s * zswitch(:,:) 161 245 zat_i_ini(:,:) = rn_ati_ini_s * zswitch(:,:) 162 zts_u_ini(:,:) = rn_tmi_ini_s * zswitch(:,:)163 246 zsm_i_ini(:,:) = rn_smi_ini_s * zswitch(:,:) 164 247 ztm_i_ini(:,:) = rn_tmi_ini_s * zswitch(:,:) 248 zt_su_ini(:,:) = rn_tsu_ini_s * zswitch(:,:) 249 ztm_s_ini(:,:) = rn_tms_ini_s * zswitch(:,:) 250 zapnd_ini(:,:) = rn_apd_ini_s * zswitch(:,:) 251 zhpnd_ini(:,:) = rn_hpd_ini_s * zswitch(:,:) 165 252 END WHERE 166 zvt_i_ini(:,:) = zht_i_ini(:,:) * zat_i_ini(:,:)167 253 ! 168 254 ENDIF 255 !-------------! 256 ! fill fields ! 257 !-------------! 258 ! select ice covered grid points 259 npti = 0 ; nptidx(:) = 0 260 DO jj = 1, jpj 261 DO ji = 1, jpi 262 IF ( zht_i_ini(ji,jj) > 0._wp ) THEN 263 npti = npti + 1 264 nptidx(npti) = (jj - 1) * jpi + ji 265 ENDIF 266 END DO 267 END DO 268 269 ! move to 1D arrays: (jpi,jpj) -> (jpi*jpj) 270 CALL tab_2d_1d( npti, nptidx(1:npti), h_i_1d (1:npti) , zht_i_ini ) 271 CALL tab_2d_1d( npti, nptidx(1:npti), h_s_1d (1:npti) , zht_s_ini ) 272 CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d(1:npti) , zat_i_ini ) 273 CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,1), ztm_i_ini ) 274 CALL tab_2d_1d( npti, nptidx(1:npti), t_s_1d (1:npti,1), ztm_s_ini ) 275 CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d(1:npti) , zt_su_ini ) 276 CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d (1:npti) , zsm_i_ini ) 277 278 ! allocate temporary arrays 279 ALLOCATE( zhi_2d(npti,jpl), zhs_2d(npti,jpl), zai_2d (npti,jpl), & 280 & zti_2d(npti,jpl), zts_2d(npti,jpl), ztsu_2d(npti,jpl), zsi_2d(npti,jpl) ) 169 281 170 !------------------------------------------------------------------ 171 ! 3) Distribute ice concentration and thickness into the categories 172 !------------------------------------------------------------------ 173 ! a gaussian distribution for ice concentration is used 174 ! then we check whether the distribution fullfills 175 ! volume and area conservation, positivity and ice categories bounds 176 177 IF( jpl == 1 ) THEN 178 ! 179 zh_i_ini(:,:,1) = zht_i_ini(:,:) 180 za_i_ini(:,:,1) = zat_i_ini(:,:) 181 ! 182 ELSE 183 zh_i_ini(:,:,:) = 0._wp 184 za_i_ini(:,:,:) = 0._wp 185 ! 282 ! distribute 1-cat into jpl-cat: (jpi*jpj) -> (jpi*jpj,jpl) 283 CALL ice_var_itd( h_i_1d(1:npti) , h_s_1d(1:npti) , at_i_1d(1:npti), zhi_2d, zhs_2d, zai_2d , & 284 & t_i_1d(1:npti,1), t_s_1d(1:npti,1), t_su_1d(1:npti), s_i_1d(1:npti), zti_2d, zts_2d, ztsu_2d, zsi_2d ) 285 286 ! move to 3D arrays: (jpi*jpj,jpl) -> (jpi,jpj,jpl) 287 DO jl = 1, jpl 288 zti_3d(:,:,jl) = rt0 * tmask(:,:,1) 289 zts_3d(:,:,jl) = rt0 * tmask(:,:,1) 290 END DO 291 CALL tab_2d_3d( npti, nptidx(1:npti), zhi_2d , h_i ) 292 CALL tab_2d_3d( npti, nptidx(1:npti), zhs_2d , h_s ) 293 CALL tab_2d_3d( npti, nptidx(1:npti), zai_2d , a_i ) 294 CALL tab_2d_3d( npti, nptidx(1:npti), zti_2d , zti_3d ) 295 CALL tab_2d_3d( npti, nptidx(1:npti), zts_2d , zts_3d ) 296 CALL tab_2d_3d( npti, nptidx(1:npti), ztsu_2d , t_su ) 297 CALL tab_2d_3d( npti, nptidx(1:npti), zsi_2d , s_i ) 298 299 ! deallocate temporary arrays 300 DEALLOCATE( zhi_2d, zhs_2d, zai_2d , & 301 & zti_2d, zts_2d, ztsu_2d, zsi_2d ) 302 303 ! Melt ponds: distribute uniformely over the categories 304 IF ( ln_pnd_CST .OR. ln_pnd_H12 ) THEN 305 DO jl = 1, jpl 306 a_ip_frac(:,:,jl) = zapnd_ini(:,:) 307 h_ip (:,:,jl) = zhpnd_ini(:,:) 308 a_ip (:,:,jl) = a_ip_frac(:,:,jl) * a_i (:,:,jl) 309 v_ip (:,:,jl) = h_ip (:,:,jl) * a_ip(:,:,jl) 310 END DO 311 ENDIF 312 313 ! calculate extensive and intensive variables 314 CALL ice_var_salprof ! for sz_i 315 DO jl = 1, jpl 186 316 DO jj = 1, jpj 187 317 DO ji = 1, jpi 188 ! 189 IF( zat_i_ini(ji,jj) > 0._wp .AND. zht_i_ini(ji,jj) > 0._wp )THEN 190 191 ! find which category (jl0) the input ice thickness falls into 192 jl0 = jpl 193 DO jl = 1, jpl 194 IF ( ( zht_i_ini(ji,jj) > hi_max(jl-1) ) .AND. ( zht_i_ini(ji,jj) <= hi_max(jl) ) ) THEN 195 jl0 = jl 196 CYCLE 197 ENDIF 198 END DO 199 ! 200 itest(:) = 0 201 i_fill = jpl + 1 !------------------------------------ 202 DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) ) ! iterative loop on i_fill categories 203 ! !------------------------------------ 204 i_fill = i_fill - 1 205 ! 206 zh_i_ini(ji,jj,:) = 0._wp 207 za_i_ini(ji,jj,:) = 0._wp 208 itest(:) = 0 209 ! 210 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 211 zh_i_ini(ji,jj,1) = zht_i_ini(ji,jj) 212 za_i_ini(ji,jj,1) = zat_i_ini(ji,jj) 213 ELSE !-- case ice is thicker: fill categories >1 214 ! thickness 215 DO jl = 1, i_fill-1 216 zh_i_ini(ji,jj,jl) = hi_mean(jl) 217 END DO 218 ! 219 ! concentration 220 za_i_ini(ji,jj,jl0) = zat_i_ini(ji,jj) / SQRT(REAL(jpl)) 221 DO jl = 1, i_fill - 1 222 IF( jl /= jl0 )THEN 223 zarg = ( zh_i_ini(ji,jj,jl) - zht_i_ini(ji,jj) ) / ( 0.5_wp * zht_i_ini(ji,jj) ) 224 za_i_ini(ji,jj,jl) = za_i_ini(ji,jj,jl0) * EXP(-zarg**2) 225 ENDIF 226 END DO 227 228 ! last category 229 za_i_ini(ji,jj,i_fill) = zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:i_fill-1) ) 230 zV = SUM( za_i_ini(ji,jj,1:i_fill-1) * zh_i_ini(ji,jj,1:i_fill-1) ) 231 zh_i_ini(ji,jj,i_fill) = ( zvt_i_ini(ji,jj) - zV ) / MAX( za_i_ini(ji,jj,i_fill), epsi10 ) 232 233 ! correction if concentration of upper cat is greater than lower cat 234 ! (it should be a gaussian around jl0 but sometimes it is not) 235 IF ( jl0 /= jpl ) THEN 236 DO jl = jpl, jl0+1, -1 237 IF ( za_i_ini(ji,jj,jl) > za_i_ini(ji,jj,jl-1) ) THEN 238 zdv = zh_i_ini(ji,jj,jl) * za_i_ini(ji,jj,jl) 239 zh_i_ini(ji,jj,jl ) = 0._wp 240 za_i_ini(ji,jj,jl ) = 0._wp 241 za_i_ini(ji,jj,1:jl-1) = za_i_ini(ji,jj,1:jl-1) & 242 & + zdv / MAX( REAL(jl-1) * zht_i_ini(ji,jj), epsi10 ) 243 END IF 244 ENDDO 245 ENDIF 246 ! 247 ENDIF 248 ! 249 ! Compatibility tests 250 zconv = ABS( zat_i_ini(ji,jj) - SUM( za_i_ini(ji,jj,1:jpl) ) ) ! Test 1: area conservation 251 IF ( zconv < epsi06 ) itest(1) = 1 252 ! 253 zconv = ABS( zat_i_ini(ji,jj) * zht_i_ini(ji,jj) & ! Test 2: volume conservation 254 & - SUM( za_i_ini (ji,jj,1:jpl) * zh_i_ini (ji,jj,1:jpl) ) ) 255 IF ( zconv < epsi06 ) itest(2) = 1 256 ! 257 IF ( zh_i_ini(ji,jj,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 258 ! 259 itest(4) = 1 260 DO jl = 1, i_fill 261 IF ( za_i_ini(ji,jj,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations 262 END DO 263 ! !---------------------------- 264 END DO ! end iteration on categories 265 ! !---------------------------- 266 IF( lwp .AND. SUM(itest) /= 4 ) THEN 267 WRITE(numout,*) 268 WRITE(numout,*) ' !!!! ALERT itest is not equal to 4 !!! ' 269 WRITE(numout,*) ' !!!! Something is wrong in the SI3 initialization procedure ' 270 WRITE(numout,*) 271 WRITE(numout,*) ' *** itest_i (i=1,4) = ', itest(:) 272 WRITE(numout,*) ' zat_i_ini : ', zat_i_ini(ji,jj) 273 WRITE(numout,*) ' zht_i_ini : ', zht_i_ini(ji,jj) 274 ENDIF 275 ! 276 ENDIF 277 ! 318 v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) 319 v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) 320 sv_i(ji,jj,jl) = MIN( MAX( rn_simin , s_i(ji,jj,jl) ) , rn_simax ) * v_i(ji,jj,jl) 278 321 END DO 279 322 END DO 280 ENDIF 281 282 !--------------------------------------------------------------------- 283 ! 4) Fill in sea ice arrays 284 !--------------------------------------------------------------------- 285 ! 286 ! Ice concentration, thickness and volume, ice salinity, ice age, surface temperature 287 DO jl = 1, jpl ! loop over categories 288 DO jj = 1, jpj 289 DO ji = 1, jpi 290 a_i(ji,jj,jl) = zswitch(ji,jj) * za_i_ini(ji,jj,jl) ! concentration 291 h_i(ji,jj,jl) = zswitch(ji,jj) * zh_i_ini(ji,jj,jl) ! ice thickness 292 s_i(ji,jj,jl) = zswitch(ji,jj) * zsm_i_ini(ji,jj) ! salinity 293 o_i(ji,jj,jl) = 0._wp ! age (0 day) 294 t_su(ji,jj,jl) = zswitch(ji,jj) * zts_u_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0 ! surf temp 295 ! 296 IF( zht_i_ini(ji,jj) > 0._wp )THEN 297 h_s(ji,jj,jl)= h_i(ji,jj,jl) * ( zht_s_ini(ji,jj) / zht_i_ini(ji,jj) ) ! snow depth 298 ELSE 299 h_s(ji,jj,jl)= 0._wp 300 ENDIF 301 ! 302 ! This case below should not be used if (h_s/h_i) is ok in namelist 303 ! In case snow load is in excess that would lead to transformation from snow to ice 304 ! Then, transfer the snow excess into the ice (different from icethd_dh) 305 zdh = MAX( 0._wp, ( rhos * h_s(ji,jj,jl) + ( rhoi - rau0 ) * h_i(ji,jj,jl) ) * r1_rau0 ) 306 ! recompute h_i, h_s avoiding out of bounds values 307 h_i(ji,jj,jl) = MIN( hi_max(jl), h_i(ji,jj,jl) + zdh ) 308 h_s(ji,jj,jl) = MAX( 0._wp, h_s(ji,jj,jl) - zdh * rhoi * r1_rhos ) 309 ! 310 ! ice volume, salt content, age content 311 v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) ! ice volume 312 v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) ! snow volume 313 sv_i(ji,jj,jl) = MIN( s_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content 314 oa_i(ji,jj,jl) = o_i(ji,jj,jl) * a_i(ji,jj,jl) ! age content 315 END DO 316 END DO 317 END DO 318 ! 319 IF( nn_icesal /= 2 ) THEN ! for constant salinity in time 320 CALL ice_var_salprof 321 sv_i = s_i * v_i 322 ENDIF 323 ! 324 ! Snow temperature and heat content 325 DO jk = 1, nlay_s 326 DO jl = 1, jpl ! loop over categories 323 END DO 324 ! 325 DO jl = 1, jpl 326 DO jk = 1, nlay_s 327 327 DO jj = 1, jpj 328 328 DO ji = 1, jpi 329 t_s(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0 330 ! Snow energy of melting 331 e_s(ji,jj,jk,jl) = zswitch(ji,jj) * rhos * ( rcpi * ( rt0 - t_s(ji,jj,jk,jl) ) + rLfus ) 332 ! 333 ! Mutliply by volume, and divide by number of layers to get heat content in J/m2 334 e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * v_s(ji,jj,jl) * r1_nlay_s 329 t_s(ji,jj,jk,jl) = zts_3d(ji,jj,jl) 330 e_s(ji,jj,jk,jl) = zswitch(ji,jj) * v_s(ji,jj,jl) * r1_nlay_s * & 331 & rhos * ( rcpi * ( rt0 - t_s(ji,jj,jk,jl) ) + rLfus ) 335 332 END DO 336 333 END DO … … 338 335 END DO 339 336 ! 340 ! Ice salinity, temperature and heat content 341 DO jk = 1, nlay_i 342 DO jl = 1, jpl ! loop over categories 337 DO jl = 1, jpl 338 DO jk = 1, nlay_i 343 339 DO jj = 1, jpj 344 340 DO ji = 1, jpi 345 t_i (ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rt0 346 sz_i(ji,jj,jk,jl) = zswitch(ji,jj) * zsm_i_ini(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * rn_simin 347 ztmelts = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 !Melting temperature in K 348 ! 349 ! heat content per unit volume 350 e_i(ji,jj,jk,jl) = zswitch(ji,jj) * rhoi * ( rcpi * ( ztmelts - t_i(ji,jj,jk,jl) ) & 351 & + rLfus * ( 1._wp - (ztmelts-rt0) / MIN( (t_i(ji,jj,jk,jl)-rt0) , -epsi20 ) ) & 352 & - rcp * ( ztmelts - rt0 ) ) 353 ! 354 ! Mutliply by ice volume, and divide by number of layers to get heat content in J/m2 355 e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * v_i(ji,jj,jl) * r1_nlay_i 341 t_i (ji,jj,jk,jl) = zti_3d(ji,jj,jl) 342 ztmelts = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 ! melting temperature in K 343 e_i(ji,jj,jk,jl) = zswitch(ji,jj) * v_i(ji,jj,jl) * r1_nlay_i * & 344 & rhoi * ( rcpi * ( ztmelts - t_i(ji,jj,jk,jl) ) + & 345 & rLfus * ( 1._wp - (ztmelts-rt0) / MIN( (t_i(ji,jj,jk,jl)-rt0), -epsi20 ) ) & 346 & - rcp * ( ztmelts - rt0 ) ) 356 347 END DO 357 348 END DO 358 349 END DO 359 350 END DO 360 ! 361 tn_ice (:,:,:) = t_su (:,:,:) 362 t1_ice (:,:,:) = t_i (:,:,1,:) ! initialisation of 1st layer temp for coupled simu 363 364 ! Melt pond volume and fraction 365 IF ( ln_pnd_CST .OR. ln_pnd_H12 ) THEN ; zfac = 1._wp 366 ELSE ; zfac = 0._wp 367 ENDIF 368 DO jl = 1, jpl 369 a_ip_frac(:,:,jl) = rn_apnd * zswitch(:,:) * zfac 370 h_ip (:,:,jl) = rn_hpnd * zswitch(:,:) * zfac 371 END DO 372 a_ip(:,:,:) = a_ip_frac(:,:,:) * a_i (:,:,:) 373 v_ip(:,:,:) = h_ip (:,:,:) * a_ip(:,:,:) 374 ! 375 ELSE ! if ln_iceini=false 376 a_i (:,:,:) = 0._wp 377 v_i (:,:,:) = 0._wp 378 v_s (:,:,:) = 0._wp 379 sv_i (:,:,:) = 0._wp 380 oa_i (:,:,:) = 0._wp 381 h_i (:,:,:) = 0._wp 382 h_s (:,:,:) = 0._wp 383 s_i (:,:,:) = 0._wp 384 o_i (:,:,:) = 0._wp 385 ! 386 e_i(:,:,:,:) = 0._wp 387 e_s(:,:,:,:) = 0._wp 388 ! 389 DO jl = 1, jpl 390 DO jk = 1, nlay_i 391 t_i(:,:,jk,jl) = rt0 * tmask(:,:,1) 392 END DO 393 DO jk = 1, nlay_s 394 t_s(:,:,jk,jl) = rt0 * tmask(:,:,1) 395 END DO 396 END DO 397 398 tn_ice (:,:,:) = t_i (:,:,1,:) 399 t1_ice (:,:,:) = t_i (:,:,1,:) ! initialisation of 1st layer temp for coupled simu 400 401 a_ip(:,:,:) = 0._wp 402 v_ip(:,:,:) = 0._wp 403 a_ip_frac(:,:,:) = 0._wp 404 h_ip (:,:,:) = 0._wp 351 352 ! specific temperatures for coupled runs 353 tn_ice(:,:,:) = t_su(:,:,:) 354 t1_ice(:,:,:) = t_i (:,:,1,:) 405 355 ! 406 356 ENDIF ! ln_iceini 407 357 ! 408 at_i (:,:) = 0.0_wp 409 DO jl = 1, jpl 410 at_i (:,:) = at_i (:,:) + a_i (:,:,jl) 411 END DO 412 ! 413 ! --- set ice velocities --- ! 414 u_ice (:,:) = 0._wp 415 v_ice (:,:) = 0._wp 416 ! fields needed for ice_dyn_adv_umx 417 l_split_advumx(1) = .FALSE. 358 at_i(:,:) = SUM( a_i, dim=3 ) 418 359 ! 419 360 !---------------------------------------------- 420 ! 5) Snow-ice mass (case ice is fully embedded)361 ! 3) Snow-ice mass (case ice is fully embedded) 421 362 !---------------------------------------------- 422 363 snwice_mass (:,:) = tmask(:,:,1) * SUM( rhos * v_s(:,:,:) + rhoi * v_i(:,:,:), dim=3 ) ! snow+ice mass … … 470 411 471 412 !------------------------------------ 472 ! 6) store fields at before time-step413 ! 4) store fields at before time-step 473 414 !------------------------------------ 474 415 ! it is only necessary for the 1st interpolation by Agrif … … 508 449 ! 509 450 CHARACTER(len=256) :: cn_dir ! Root directory for location of ice files 510 TYPE(FLD_N) :: sn_hti, sn_hts, sn_ati, sn_ tsu, sn_tmi, sn_smi451 TYPE(FLD_N) :: sn_hti, sn_hts, sn_ati, sn_smi, sn_tmi, sn_tsu, sn_tms, sn_apd, sn_hpd 511 452 TYPE(FLD_N), DIMENSION(jpfldi) :: slf_i ! array of namelist informations on the fields to read 512 453 ! 513 NAMELIST/namini/ ln_iceini, ln_iceini_file, rn_thres_sst, rn_hts_ini_n, rn_hts_ini_s, & 514 & rn_hti_ini_n, rn_hti_ini_s, rn_ati_ini_n, rn_ati_ini_s, rn_smi_ini_n, & 515 & rn_smi_ini_s, rn_tmi_ini_n, rn_tmi_ini_s, & 516 & sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi, cn_dir 454 NAMELIST/namini/ ln_iceini, ln_iceini_file, rn_thres_sst, & 455 & rn_hti_ini_n, rn_hti_ini_s, rn_hts_ini_n, rn_hts_ini_s, & 456 & rn_ati_ini_n, rn_ati_ini_s, rn_smi_ini_n, rn_smi_ini_s, & 457 & rn_tmi_ini_n, rn_tmi_ini_s, rn_tsu_ini_n, rn_tsu_ini_s, rn_tms_ini_n, rn_tms_ini_s, & 458 & rn_apd_ini_n, rn_apd_ini_s, rn_hpd_ini_n, rn_hpd_ini_s, & 459 & sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi, sn_tms, sn_apd, sn_hpd, cn_dir 517 460 !!----------------------------------------------------------------------------- 518 461 ! … … 526 469 ! 527 470 slf_i(jp_hti) = sn_hti ; slf_i(jp_hts) = sn_hts 528 slf_i(jp_ati) = sn_ati ; slf_i(jp_tsu) = sn_tsu 529 slf_i(jp_tmi) = sn_tmi ; slf_i(jp_smi) = sn_smi 471 slf_i(jp_ati) = sn_ati ; slf_i(jp_smi) = sn_smi 472 slf_i(jp_tmi) = sn_tmi ; slf_i(jp_tsu) = sn_tsu ; slf_i(jp_tms) = sn_tms 473 slf_i(jp_apd) = sn_apd ; slf_i(jp_hpd) = sn_hpd 530 474 ! 531 475 IF(lwp) THEN ! control print … … 534 478 WRITE(numout,*) '~~~~~~~~~~~~~~~' 535 479 WRITE(numout,*) ' Namelist namini:' 536 WRITE(numout,*) ' initialization with ice (T) or not (F) ln_iceini = ', ln_iceini 537 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file 538 WRITE(numout,*) ' max delta ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst 539 WRITE(numout,*) ' initial snow thickness in the north rn_hts_ini_n = ', rn_hts_ini_n 540 WRITE(numout,*) ' initial snow thickness in the south rn_hts_ini_s = ', rn_hts_ini_s 541 WRITE(numout,*) ' initial ice thickness in the north rn_hti_ini_n = ', rn_hti_ini_n 542 WRITE(numout,*) ' initial ice thickness in the south rn_hti_ini_s = ', rn_hti_ini_s 543 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_n = ', rn_ati_ini_n 544 WRITE(numout,*) ' initial ice concentr. in the north rn_ati_ini_s = ', rn_ati_ini_s 545 WRITE(numout,*) ' initial ice salinity in the north rn_smi_ini_n = ', rn_smi_ini_n 546 WRITE(numout,*) ' initial ice salinity in the south rn_smi_ini_s = ', rn_smi_ini_s 547 WRITE(numout,*) ' initial ice/snw temp in the north rn_tmi_ini_n = ', rn_tmi_ini_n 548 WRITE(numout,*) ' initial ice/snw temp in the south rn_tmi_ini_s = ', rn_tmi_ini_s 480 WRITE(numout,*) ' ice initialization (T) or not (F) ln_iceini = ', ln_iceini 481 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file 482 WRITE(numout,*) ' max ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst 483 IF( ln_iceini .AND. .NOT.ln_iceini_file ) THEN 484 WRITE(numout,*) ' initial snw thickness in the north-south rn_hts_ini = ', rn_hts_ini_n,rn_hts_ini_s 485 WRITE(numout,*) ' initial ice thickness in the north-south rn_hti_ini = ', rn_hti_ini_n,rn_hti_ini_s 486 WRITE(numout,*) ' initial ice concentr in the north-south rn_ati_ini = ', rn_ati_ini_n,rn_ati_ini_s 487 WRITE(numout,*) ' initial ice salinity in the north-south rn_smi_ini = ', rn_smi_ini_n,rn_smi_ini_s 488 WRITE(numout,*) ' initial surf temperat in the north-south rn_tsu_ini = ', rn_tsu_ini_n,rn_tsu_ini_s 489 WRITE(numout,*) ' initial ice temperat in the north-south rn_tmi_ini = ', rn_tmi_ini_n,rn_tmi_ini_s 490 WRITE(numout,*) ' initial snw temperat in the north-south rn_tms_ini = ', rn_tms_ini_n,rn_tms_ini_s 491 WRITE(numout,*) ' initial pnd fraction in the north-south rn_apd_ini = ', rn_apd_ini_n,rn_apd_ini_s 492 WRITE(numout,*) ' initial pnd depth in the north-south rn_hpd_ini = ', rn_hpd_ini_n,rn_hpd_ini_s 493 ENDIF 549 494 ENDIF 550 495 ! … … 554 499 ALLOCATE( si(jpfldi), STAT=ierror ) 555 500 IF( ierror > 0 ) THEN 556 CALL ctl_stop( ' Ice_ini in iceistate: unable to allocate si structure' ) ; RETURN501 CALL ctl_stop( 'ice_istate_ini in iceistate: unable to allocate si structure' ) ; RETURN 557 502 ENDIF 558 503 ! 559 504 DO ifpr = 1, jpfldi 560 505 ALLOCATE( si(ifpr)%fnow(jpi,jpj,1) ) 561 ALLOCATE( si(ifpr)%fdta(jpi,jpj,1,2) )506 IF( slf_i(ifpr)%ln_tint ) ALLOCATE( si(ifpr)%fdta(jpi,jpj,1,2) ) 562 507 END DO 563 508 ! 564 509 ! fill si with slf_i and control print 565 CALL fld_fill( si, slf_i, cn_dir, 'ice_istate', 'ice istate ini', 'numnam_ice' ) 566 ! 567 CALL fld_read( nit000, 1, si ) ! input fields provided at the current time-step 510 CALL fld_fill( si, slf_i, cn_dir, 'ice_istate_ini', 'initialization of sea ice fields', 'numnam_ice' ) 568 511 ! 569 512 ENDIF -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icerst.F90
r10425 r11413 14 14 !! ice_rst_read : read restart file 15 15 !!---------------------------------------------------------------------- 16 USE ice ! sea-ice variables16 USE ice ! sea-ice: variables 17 17 USE dom_oce ! ocean domain 18 USE phycst , ONLY : rt0 18 19 USE sbc_oce , ONLY : nn_fsbc, ln_cpl 19 USE icectl 20 USE iceistate ! sea-ice: initial state 21 USE icectl ! sea-ice: control 20 22 ! 21 23 USE in_out_manager ! I/O manager … … 53 55 IF( kt == nit000 ) lrst_ice = .FALSE. ! default definition 54 56 57 IF( ln_rst_list .OR. nn_stock /= -1 ) THEN 55 58 ! in order to get better performances with NetCDF format, we open and define the ice restart file 56 59 ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice 57 60 ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 58 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. n stock == nn_fsbc &61 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nn_stock == nn_fsbc & 59 62 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 60 63 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN … … 81 84 ENDIF 82 85 ENDIF 86 ENDIF 83 87 ! 84 88 IF( ln_icectl ) CALL ice_prt( kt, iiceprt, jiceprt, 1, ' - Beginning the time step - ' ) ! control print … … 118 122 119 123 ! Prognostic variables 120 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i ) 121 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s ) 122 CALL iom_rstput( iter, nitrst, numriw, 'sv_i', sv_i ) 123 CALL iom_rstput( iter, nitrst, numriw, 'oa_i', oa_i ) 124 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i ) 125 CALL iom_rstput( iter, nitrst, numriw, 't_su', t_su ) 126 ! Melt ponds 127 CALL iom_rstput( iter, nitrst, numriw, 'a_ip', a_ip ) 128 CALL iom_rstput( iter, nitrst, numriw, 'v_ip', v_ip ) 124 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i ) 125 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s ) 126 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i ) 127 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i ) 128 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su ) 129 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice ) 130 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice ) 131 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i ) 132 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip ) 133 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip ) 129 134 ! Snow enthalpy 130 135 DO jk = 1, nlay_s … … 141 146 CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 142 147 END DO 143 ! ice velocity144 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice ) ! u_ice145 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice ) ! v_ice146 148 ! fields needed for Met Office (Jules) coupling 147 149 IF( ln_cpl ) THEN … … 169 171 INTEGER :: jk 170 172 LOGICAL :: llok 171 INTEGER :: id 1! local integer173 INTEGER :: id0, id1, id2, id3, id4 ! local integer 172 174 CHARACTER(len=25) :: znam 173 175 CHARACTER(len=2) :: zchar, zchar1 … … 184 186 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kdlev = jpl ) 185 187 186 CALL iom_get( numrir, 'nn_fsbc', zfice ) 187 CALL iom_get( numrir, 'kt_ice' , ziter ) 188 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 189 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 190 191 ! Control of date 192 IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 193 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart', & 194 & ' verify the file or rerun with the value 0 for the', & 195 & ' control of time parameter nrstdt' ) 196 IF( NINT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 197 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 198 & ' verify the file or rerun with the value 0 for the', & 199 & ' control of time parameter nrstdt' ) 200 201 ! Prognostic variables 202 CALL iom_get( numrir, jpdom_autoglo, 'v_i' , v_i ) 203 CALL iom_get( numrir, jpdom_autoglo, 'v_s' , v_s ) 204 CALL iom_get( numrir, jpdom_autoglo, 'sv_i', sv_i ) 205 CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 206 CALL iom_get( numrir, jpdom_autoglo, 'a_i' , a_i ) 207 CALL iom_get( numrir, jpdom_autoglo, 't_su', t_su ) 208 ! Melt ponds 209 id1 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 210 IF( id1 > 0 ) THEN ! fields exist (melt ponds) 211 CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 212 CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 213 ELSE ! start from rest 214 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' 215 a_ip(:,:,:) = 0._wp 216 v_ip(:,:,:) = 0._wp 217 ENDIF 218 ! Snow enthalpy 219 DO jk = 1, nlay_s 220 WRITE(zchar1,'(I2.2)') jk 221 znam = 'e_s'//'_l'//zchar1 222 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 223 e_s(:,:,jk,:) = z3d(:,:,:) 224 END DO 225 ! Ice enthalpy 226 DO jk = 1, nlay_i 227 WRITE(zchar1,'(I2.2)') jk 228 znam = 'e_i'//'_l'//zchar1 229 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 230 e_i(:,:,jk,:) = z3d(:,:,:) 231 END DO 232 ! ice velocity 233 CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 234 CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 235 236 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 237 238 ! fields needed for Met Office (Jules) coupling 239 IF( ln_cpl ) THEN 240 CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 241 CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice ) 188 ! test if v_i exists 189 id0 = iom_varid( numrir, 'v_i' , ldstop = .FALSE. ) 190 191 ! ! ------------------------------ ! 192 IF( id0 > 0 ) THEN ! == case of a normal restart == ! 193 ! ! ------------------------------ ! 194 195 ! Time info 196 CALL iom_get( numrir, 'nn_fsbc', zfice ) 197 CALL iom_get( numrir, 'kt_ice' , ziter ) 198 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 199 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 200 201 ! Control of date 202 IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 203 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart', & 204 & ' verify the file or rerun with the value 0 for the', & 205 & ' control of time parameter nrstdt' ) 206 IF( NINT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 207 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 208 & ' verify the file or rerun with the value 0 for the', & 209 & ' control of time parameter nrstdt' ) 210 211 ! --- mandatory fields --- ! 212 CALL iom_get( numrir, jpdom_autoglo, 'v_i' , v_i ) 213 CALL iom_get( numrir, jpdom_autoglo, 'v_s' , v_s ) 214 CALL iom_get( numrir, jpdom_autoglo, 'sv_i' , sv_i ) 215 CALL iom_get( numrir, jpdom_autoglo, 'a_i' , a_i ) 216 CALL iom_get( numrir, jpdom_autoglo, 't_su' , t_su ) 217 CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 218 CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 219 ! Snow enthalpy 220 DO jk = 1, nlay_s 221 WRITE(zchar1,'(I2.2)') jk 222 znam = 'e_s'//'_l'//zchar1 223 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 224 e_s(:,:,jk,:) = z3d(:,:,:) 225 END DO 226 ! Ice enthalpy 227 DO jk = 1, nlay_i 228 WRITE(zchar1,'(I2.2)') jk 229 znam = 'e_i'//'_l'//zchar1 230 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 231 e_i(:,:,jk,:) = z3d(:,:,:) 232 END DO 233 ! -- optional fields -- ! 234 ! ice age 235 id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 236 IF( id1 > 0 ) THEN ! fields exist 237 CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 238 ELSE ! start from rest 239 IF(lwp) WRITE(numout,*) ' ==>> previous run without ice age output then set it to zero' 240 oa_i(:,:,:) = 0._wp 241 ENDIF 242 ! melt ponds 243 id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 244 IF( id2 > 0 ) THEN ! fields exist 245 CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 246 CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 247 ELSE ! start from rest 248 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' 249 a_ip(:,:,:) = 0._wp 250 v_ip(:,:,:) = 0._wp 251 ENDIF 252 ! fields needed for Met Office (Jules) coupling 253 IF( ln_cpl ) THEN 254 id3 = iom_varid( numrir, 'cnd_ice' , ldstop = .FALSE. ) 255 id4 = iom_varid( numrir, 't1_ice' , ldstop = .FALSE. ) 256 IF( id3 > 0 .AND. id4 > 0 ) THEN ! fields exist 257 CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 258 CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice ) 259 ELSE ! start from rest 260 IF(lwp) WRITE(numout,*) ' ==>> previous run without conductivity output then set it to zero' 261 cnd_ice(:,:,:) = 0._wp 262 t1_ice (:,:,:) = rt0 263 ENDIF 264 ENDIF 265 266 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 267 268 ! ! ---------------------------------- ! 269 ELSE ! == case of a simplified restart == ! 270 ! ! ---------------------------------- ! 271 CALL ctl_warn('ice_rst_read: you are using a simplified ice restart') 272 ! 273 CALL ice_istate_init 274 CALL ice_istate( nit000 ) 275 ! 276 IF( .NOT.ln_iceini .OR. .NOT.ln_iceini_file ) & 277 & CALL ctl_stop('STOP', 'ice_rst_read: you need ln_ice_ini=T and ln_iceini_file=T') 278 ! 242 279 ENDIF 243 280 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icesbc.F90
r11360 r11413 118 118 INTEGER, INTENT(in) :: ksbc ! flux formulation (user defined, bulk or Pure Coupled) 119 119 ! 120 INTEGER :: ji, jj, jl ! dummy loop index 121 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb_os, zalb_cs ! ice albedo under overcast/clear sky 122 REAL(wp), DIMENSION(jpi,jpj) :: zalb ! 2D workspace 120 INTEGER :: ji, jj, jl ! dummy loop index 121 REAL(wp) :: zmiss_val ! missing value retrieved from xios 122 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zalb_os, zalb_cs ! ice albedo under overcast/clear sky 123 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: zalb, zmsk00 ! 2D workspace 123 124 !!-------------------------------------------------------------------- 124 125 ! … … 130 131 WRITE(numout,*)'~~~~~~~~~~~~~~~' 131 132 ENDIF 133 134 ! get missing value from xml 135 CALL iom_miss_val( "icetemp", zmiss_val ) 132 136 133 137 ! --- cloud-sky and overcast-sky ice albedos --- ! … … 157 161 158 162 !--- output ice albedo and surface albedo ---! 159 IF( iom_use('icealb') ) THEN 160 WHERE( at_i_b <= epsi06 ) ; zalb(:,:) = rn_alb_oce 161 ELSEWHERE ; zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 163 IF( iom_use('icealb') .OR. iom_use('albedo') ) THEN 164 165 ALLOCATE( zalb(jpi,jpj), zmsk00(jpi,jpj) ) 166 167 WHERE( at_i_b <= epsi06 ) 168 zmsk00(:,:) = 0._wp 169 zalb (:,:) = rn_alb_oce 170 ELSEWHERE 171 zmsk00(:,:) = 1._wp 172 zalb (:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b 162 173 END WHERE 163 CALL iom_put( "icealb" , zalb(:,:) )164 ENDIF165 IF( iom_use('albedo') ) THEN174 ! ice albedo 175 CALL iom_put( 'icealb' , zalb * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) 176 ! ice+ocean albedo 166 177 zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + rn_alb_oce * ( 1._wp - at_i_b ) 167 CALL iom_put( "albedo" , zalb(:,:) ) 178 CALL iom_put( 'albedo' , zalb ) 179 180 DEALLOCATE( zalb, zmsk00 ) 181 168 182 ENDIF 169 183 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icestp.F90
r11348 r11413 254 254 IF( .NOT. ln_rstart ) THEN ! start from rest: sea-ice deduced from sst 255 255 CALL ice_istate_init 256 CALL ice_istate 256 CALL ice_istate( nit000 ) 257 257 ELSE ! start from a restart file 258 258 CALL ice_rst_read … … 425 425 wfx_err_sub(:,:) = 0._wp 426 426 ! 427 afx_tot(:,:) = 0._wp ;428 !429 427 diag_heat(:,:) = 0._wp ; diag_sice(:,:) = 0._wp 430 428 diag_vice(:,:) = 0._wp ; diag_vsnw(:,:) = 0._wp -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/iceupdate.F90
r10425 r11413 198 198 ! --- salt fluxes [kg/m2/s] --- ! 199 199 ! ! sfxice = sfxbog + sfxbom + sfxsum + sfxsni + sfxopw + sfxres + sfxdyn + sfxbri + sfxsub + sfxlam 200 IF( iom_use('sfxice' ) ) CALL iom_put( "sfxice", sfx * 1.e-03 ) ! salt flux from total ice growth/melt201 IF( iom_use('sfxbog' ) ) CALL iom_put( "sfxbog", sfx_bog * 1.e-03 ) ! salt flux from bottom growth202 IF( iom_use('sfxbom' ) ) CALL iom_put( "sfxbom", sfx_bom * 1.e-03 ) ! salt flux from bottom melting203 IF( iom_use('sfxsum' ) ) CALL iom_put( "sfxsum", sfx_sum * 1.e-03 ) ! salt flux from surface melting204 IF( iom_use('sfxlam' ) ) CALL iom_put( "sfxlam", sfx_lam * 1.e-03 ) ! salt flux from lateral melting205 IF( iom_use('sfxsni' ) ) CALL iom_put( "sfxsni", sfx_sni * 1.e-03 ) ! salt flux from snow ice formation206 IF( iom_use('sfxopw' ) ) CALL iom_put( "sfxopw", sfx_opw * 1.e-03 ) ! salt flux from open water formation207 IF( iom_use('sfxdyn' ) ) CALL iom_put( "sfxdyn", sfx_dyn * 1.e-03 ) ! salt flux from ridging rafting208 IF( iom_use('sfxbri' ) ) CALL iom_put( "sfxbri", sfx_bri * 1.e-03 ) ! salt flux from brines209 IF( iom_use('sfxres' ) ) CALL iom_put( "sfxres", sfx_res * 1.e-03 ) ! salt flux from undiagnosed processes210 IF( iom_use('sfxsub' ) ) CALL iom_put( "sfxsub", sfx_sub * 1.e-03 ) ! salt flux from sublimation200 IF( iom_use('sfxice' ) ) CALL iom_put( 'sfxice', sfx * 1.e-03 ) ! salt flux from total ice growth/melt 201 IF( iom_use('sfxbog' ) ) CALL iom_put( 'sfxbog', sfx_bog * 1.e-03 ) ! salt flux from bottom growth 202 IF( iom_use('sfxbom' ) ) CALL iom_put( 'sfxbom', sfx_bom * 1.e-03 ) ! salt flux from bottom melting 203 IF( iom_use('sfxsum' ) ) CALL iom_put( 'sfxsum', sfx_sum * 1.e-03 ) ! salt flux from surface melting 204 IF( iom_use('sfxlam' ) ) CALL iom_put( 'sfxlam', sfx_lam * 1.e-03 ) ! salt flux from lateral melting 205 IF( iom_use('sfxsni' ) ) CALL iom_put( 'sfxsni', sfx_sni * 1.e-03 ) ! salt flux from snow ice formation 206 IF( iom_use('sfxopw' ) ) CALL iom_put( 'sfxopw', sfx_opw * 1.e-03 ) ! salt flux from open water formation 207 IF( iom_use('sfxdyn' ) ) CALL iom_put( 'sfxdyn', sfx_dyn * 1.e-03 ) ! salt flux from ridging rafting 208 IF( iom_use('sfxbri' ) ) CALL iom_put( 'sfxbri', sfx_bri * 1.e-03 ) ! salt flux from brines 209 IF( iom_use('sfxres' ) ) CALL iom_put( 'sfxres', sfx_res * 1.e-03 ) ! salt flux from undiagnosed processes 210 IF( iom_use('sfxsub' ) ) CALL iom_put( 'sfxsub', sfx_sub * 1.e-03 ) ! salt flux from sublimation 211 211 212 212 ! --- mass fluxes [kg/m2/s] --- ! 213 IF( iom_use('emp_oce' ) ) CALL iom_put( "emp_oce", emp_oce ) ! emp over ocean (taking into account the snow blown away from the ice)214 IF( iom_use('emp_ice' ) ) CALL iom_put( "emp_ice", emp_ice ) ! emp over ice (taking into account the snow blown away from the ice)213 CALL iom_put( 'emp_oce', emp_oce ) ! emp over ocean (taking into account the snow blown away from the ice) 214 CALL iom_put( 'emp_ice', emp_ice ) ! emp over ice (taking into account the snow blown away from the ice) 215 215 216 216 ! ! vfxice = vfxbog + vfxbom + vfxsum + vfxsni + vfxopw + vfxdyn + vfxres + vfxlam + vfxpnd 217 IF( iom_use('vfxice' ) ) CALL iom_put( "vfxice" , wfx_ice) ! mass flux from total ice growth/melt218 IF( iom_use('vfxbog' ) ) CALL iom_put( "vfxbog" , wfx_bog) ! mass flux from bottom growth219 IF( iom_use('vfxbom' ) ) CALL iom_put( "vfxbom" , wfx_bom) ! mass flux from bottom melt220 IF( iom_use('vfxsum' ) ) CALL iom_put( "vfxsum" , wfx_sum) ! mass flux from surface melt221 IF( iom_use('vfxlam' ) ) CALL iom_put( "vfxlam" , wfx_lam) ! mass flux from lateral melt222 IF( iom_use('vfxsni' ) ) CALL iom_put( "vfxsni" , wfx_sni) ! mass flux from snow-ice formation223 IF( iom_use('vfxopw' ) ) CALL iom_put( "vfxopw" , wfx_opw) ! mass flux from growth in open water224 IF( iom_use('vfxdyn' ) ) CALL iom_put( "vfxdyn" , wfx_dyn) ! mass flux from dynamics (ridging)225 IF( iom_use('vfxres' ) ) CALL iom_put( "vfxres" , wfx_res) ! mass flux from undiagnosed processes226 IF( iom_use('vfxpnd' ) ) CALL iom_put( "vfxpnd" , wfx_pnd) ! mass flux from melt ponds227 IF( iom_use('vfxsub' ) ) CALL iom_put( "vfxsub", wfx_ice_sub ) ! mass flux from ice sublimation (ice-atm.)228 IF( iom_use('vfxsub_err') ) CALL iom_put( "vfxsub_err", wfx_err_sub ) ! "excess" of sublimation sent to ocean229 230 IF ( iom_use( "vfxthin") ) THEN ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations217 CALL iom_put( 'vfxice' , wfx_ice ) ! mass flux from total ice growth/melt 218 CALL iom_put( 'vfxbog' , wfx_bog ) ! mass flux from bottom growth 219 CALL iom_put( 'vfxbom' , wfx_bom ) ! mass flux from bottom melt 220 CALL iom_put( 'vfxsum' , wfx_sum ) ! mass flux from surface melt 221 CALL iom_put( 'vfxlam' , wfx_lam ) ! mass flux from lateral melt 222 CALL iom_put( 'vfxsni' , wfx_sni ) ! mass flux from snow-ice formation 223 CALL iom_put( 'vfxopw' , wfx_opw ) ! mass flux from growth in open water 224 CALL iom_put( 'vfxdyn' , wfx_dyn ) ! mass flux from dynamics (ridging) 225 CALL iom_put( 'vfxres' , wfx_res ) ! mass flux from undiagnosed processes 226 CALL iom_put( 'vfxpnd' , wfx_pnd ) ! mass flux from melt ponds 227 CALL iom_put( 'vfxsub' , wfx_ice_sub ) ! mass flux from ice sublimation (ice-atm.) 228 CALL iom_put( 'vfxsub_err', wfx_err_sub ) ! "excess" of sublimation sent to ocean 229 230 IF ( iom_use( 'vfxthin' ) ) THEN ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations 231 231 WHERE( hm_i(:,:) < 0.2 .AND. hm_i(:,:) > 0. ) ; z2d = wfx_bog 232 232 ELSEWHERE ; z2d = 0._wp 233 233 END WHERE 234 CALL iom_put( "vfxthin", wfx_opw + z2d )235 ENDIF 236 237 ! 238 IF( iom_use('vfxsnw' ) ) CALL iom_put( "vfxsnw", wfx_snw ) ! mass flux from total snow growth/melt239 IF( iom_use('vfxsnw_sum' ) ) CALL iom_put( "vfxsnw_sum", wfx_snw_sum ) ! mass flux from snow melt at the surface240 IF( iom_use('vfxsnw_sni' ) ) CALL iom_put( "vfxsnw_sni", wfx_snw_sni ) ! mass flux from snow melt during snow-ice formation241 IF( iom_use('vfxsnw_dyn' ) ) CALL iom_put( "vfxsnw_dyn", wfx_snw_dyn ) ! mass flux from dynamics (ridging)242 IF( iom_use('vfxsnw_sub' ) ) CALL iom_put( "vfxsnw_sub", wfx_snw_sub ) ! mass flux from snow sublimation (ice-atm.)243 IF( iom_use('vfxsnw_pre' ) ) CALL iom_put( "vfxsnw_pre", wfx_spr ) ! snow precip234 CALL iom_put( 'vfxthin', wfx_opw + z2d ) 235 ENDIF 236 237 ! ! vfxsnw = vfxsnw_sni + vfxsnw_dyn + vfxsnw_sum 238 CALL iom_put( 'vfxsnw' , wfx_snw ) ! mass flux from total snow growth/melt 239 CALL iom_put( 'vfxsnw_sum' , wfx_snw_sum ) ! mass flux from snow melt at the surface 240 CALL iom_put( 'vfxsnw_sni' , wfx_snw_sni ) ! mass flux from snow melt during snow-ice formation 241 CALL iom_put( 'vfxsnw_dyn' , wfx_snw_dyn ) ! mass flux from dynamics (ridging) 242 CALL iom_put( 'vfxsnw_sub' , wfx_snw_sub ) ! mass flux from snow sublimation (ice-atm.) 243 CALL iom_put( 'vfxsnw_pre' , wfx_spr ) ! snow precip 244 244 245 245 ! --- heat fluxes [W/m2] --- ! 246 246 ! ! qt_atm_oi - qt_oce_ai = hfxdhc - ( dihctrp + dshctrp ) 247 IF( iom_use('qsr_oce' ) ) CALL iom_put( "qsr_oce", qsr_oce * ( 1._wp - at_i_b ) ) ! solar flux at ocean surface248 IF( iom_use('qns_oce' ) ) CALL iom_put( "qns_oce", qns_oce * ( 1._wp - at_i_b ) + qemp_oce ) ! non-solar flux at ocean surface249 IF( iom_use('qsr_ice' ) ) CALL iom_put( "qsr_ice", SUM( qsr_ice * a_i_b, dim=3 ) ) ! solar flux at ice surface250 IF( iom_use('qns_ice' ) ) CALL iom_put( "qns_ice", SUM( qns_ice * a_i_b, dim=3 ) + qemp_ice ) ! non-solar flux at ice surface251 IF( iom_use('qtr_ice_bot') ) CALL iom_put( "qtr_ice_bot", SUM( qtr_ice_bot * a_i_b, dim=3 ) ) ! solar flux transmitted thru ice252 IF( iom_use('qtr_ice_top') ) CALL iom_put( "qtr_ice_top", SUM( qtr_ice_top * a_i_b, dim=3 ) ) ! solar flux transmitted thru ice surface253 IF( iom_use('qt_oce' ) ) CALL iom_put( "qt_oce", ( qsr_oce + qns_oce ) * ( 1._wp - at_i_b ) + qemp_oce )254 IF( iom_use('qt_ice' ) ) CALL iom_put( "qt_ice", SUM( ( qns_ice + qsr_ice ) * a_i_b, dim=3 ) + qemp_ice )255 IF( iom_use('qt_oce_ai' ) ) CALL iom_put( "qt_oce_ai", qt_oce_ai * tmask(:,:,1) ) ! total heat flux at the ocean surface: interface oce-(ice+atm)256 IF( iom_use('qt_atm_oi' ) ) CALL iom_put( "qt_atm_oi", qt_atm_oi * tmask(:,:,1) ) ! total heat flux at the oce-ice surface: interface atm-(ice+oce)257 IF( iom_use('qemp_oce' ) ) CALL iom_put( "qemp_oce", qemp_oce ) ! Downward Heat Flux from E-P over ocean258 IF( iom_use('qemp_ice' ) ) CALL iom_put( "qemp_ice", qemp_ice ) ! Downward Heat Flux from E-P over ice247 IF( iom_use('qsr_oce' ) ) CALL iom_put( 'qsr_oce' , qsr_oce * ( 1._wp - at_i_b ) ) ! solar flux at ocean surface 248 IF( iom_use('qns_oce' ) ) CALL iom_put( 'qns_oce' , qns_oce * ( 1._wp - at_i_b ) + qemp_oce ) ! non-solar flux at ocean surface 249 IF( iom_use('qsr_ice' ) ) CALL iom_put( 'qsr_ice' , SUM( qsr_ice * a_i_b, dim=3 ) ) ! solar flux at ice surface 250 IF( iom_use('qns_ice' ) ) CALL iom_put( 'qns_ice' , SUM( qns_ice * a_i_b, dim=3 ) + qemp_ice ) ! non-solar flux at ice surface 251 IF( iom_use('qtr_ice_bot') ) CALL iom_put( 'qtr_ice_bot', SUM( qtr_ice_bot * a_i_b, dim=3 ) ) ! solar flux transmitted thru ice 252 IF( iom_use('qtr_ice_top') ) CALL iom_put( 'qtr_ice_top', SUM( qtr_ice_top * a_i_b, dim=3 ) ) ! solar flux transmitted thru ice surface 253 IF( iom_use('qt_oce' ) ) CALL iom_put( 'qt_oce' , ( qsr_oce + qns_oce ) * ( 1._wp - at_i_b ) + qemp_oce ) 254 IF( iom_use('qt_ice' ) ) CALL iom_put( 'qt_ice' , SUM( ( qns_ice + qsr_ice ) * a_i_b, dim=3 ) + qemp_ice ) 255 IF( iom_use('qt_oce_ai' ) ) CALL iom_put( 'qt_oce_ai' , qt_oce_ai * tmask(:,:,1) ) ! total heat flux at the ocean surface: interface oce-(ice+atm) 256 IF( iom_use('qt_atm_oi' ) ) CALL iom_put( 'qt_atm_oi' , qt_atm_oi * tmask(:,:,1) ) ! total heat flux at the oce-ice surface: interface atm-(ice+oce) 257 IF( iom_use('qemp_oce' ) ) CALL iom_put( 'qemp_oce' , qemp_oce ) ! Downward Heat Flux from E-P over ocean 258 IF( iom_use('qemp_ice' ) ) CALL iom_put( 'qemp_ice' , qemp_ice ) ! Downward Heat Flux from E-P over ice 259 259 260 260 ! heat fluxes from ice transformations 261 ! 262 IF( iom_use('hfxbog' ) ) CALL iom_put ("hfxbog" , hfx_bog) ! heat flux used for ice bottom growth263 IF( iom_use('hfxbom' ) ) CALL iom_put ("hfxbom" , hfx_bom) ! heat flux used for ice bottom melt264 IF( iom_use('hfxsum' ) ) CALL iom_put ("hfxsum" , hfx_sum) ! heat flux used for ice surface melt265 IF( iom_use('hfxopw' ) ) CALL iom_put ("hfxopw" , hfx_opw) ! heat flux used for ice formation in open water266 IF( iom_use('hfxdif' ) ) CALL iom_put ("hfxdif" , hfx_dif) ! heat flux used for ice temperature change267 IF( iom_use('hfxsnw' ) ) CALL iom_put ("hfxsnw" , hfx_snw) ! heat flux used for snow melt268 IF( iom_use('hfxerr' ) ) CALL iom_put ("hfxerr" , hfx_err_dif) ! heat flux error after heat diffusion (included in qt_oce_ai)261 ! ! hfxdhc = hfxbog + hfxbom + hfxsum + hfxopw + hfxdif + hfxsnw - ( hfxthd + hfxdyn + hfxres + hfxsub + hfxspr ) 262 CALL iom_put ('hfxbog' , hfx_bog ) ! heat flux used for ice bottom growth 263 CALL iom_put ('hfxbom' , hfx_bom ) ! heat flux used for ice bottom melt 264 CALL iom_put ('hfxsum' , hfx_sum ) ! heat flux used for ice surface melt 265 CALL iom_put ('hfxopw' , hfx_opw ) ! heat flux used for ice formation in open water 266 CALL iom_put ('hfxdif' , hfx_dif ) ! heat flux used for ice temperature change 267 CALL iom_put ('hfxsnw' , hfx_snw ) ! heat flux used for snow melt 268 CALL iom_put ('hfxerr' , hfx_err_dif ) ! heat flux error after heat diffusion (included in qt_oce_ai) 269 269 270 270 ! heat fluxes associated with mass exchange (freeze/melt/precip...) 271 IF( iom_use('hfxthd' ) ) CALL iom_put ("hfxthd" , hfx_thd) !272 IF( iom_use('hfxdyn' ) ) CALL iom_put ("hfxdyn" , hfx_dyn) !273 IF( iom_use('hfxres' ) ) CALL iom_put ("hfxres" , hfx_res) !274 IF( iom_use('hfxsub' ) ) CALL iom_put ("hfxsub" , hfx_sub) !275 IF( iom_use('hfxspr' ) ) CALL iom_put ("hfxspr" , hfx_spr) ! Heat flux from snow precip heat content271 CALL iom_put ('hfxthd' , hfx_thd ) ! 272 CALL iom_put ('hfxdyn' , hfx_dyn ) ! 273 CALL iom_put ('hfxres' , hfx_res ) ! 274 CALL iom_put ('hfxsub' , hfx_sub ) ! 275 CALL iom_put ('hfxspr' , hfx_spr ) ! Heat flux from snow precip heat content 276 276 277 277 ! other heat fluxes 278 IF( iom_use('hfxsensib' ) ) CALL iom_put( "hfxsensib" , -qsb_ice_bot * at_i_b ) ! Sensible oceanic heat flux 279 IF( iom_use('hfxcndbot' ) ) CALL iom_put( "hfxcndbot" , SUM( qcn_ice_bot * a_i_b, dim=3 ) ) ! Bottom conduction flux 280 IF( iom_use('hfxcndtop' ) ) CALL iom_put( "hfxcndtop" , SUM( qcn_ice_top * a_i_b, dim=3 ) ) ! Surface conduction flux 281 282 ! diags 283 IF( iom_use('hfxdhc' ) ) CALL iom_put ("hfxdhc" , diag_heat ) ! Heat content variation in snow and ice 284 ! 278 IF( iom_use('hfxsensib' ) ) CALL iom_put( 'hfxsensib' , -qsb_ice_bot * at_i_b ) ! Sensible oceanic heat flux 279 IF( iom_use('hfxcndbot' ) ) CALL iom_put( 'hfxcndbot' , SUM( qcn_ice_bot * a_i_b, dim=3 ) ) ! Bottom conduction flux 280 IF( iom_use('hfxcndtop' ) ) CALL iom_put( 'hfxcndtop' , SUM( qcn_ice_top * a_i_b, dim=3 ) ) ! Surface conduction flux 281 285 282 ! controls 286 283 !--------- … … 413 410 !! ** Method : use of IOM library 414 411 !!---------------------------------------------------------------------- 415 CHARACTER(len=*) , INTENT(in) :: cdrw ! "READ"/"WRITE"flag412 CHARACTER(len=*) , INTENT(in) :: cdrw ! 'READ'/'WRITE' flag 416 413 INTEGER, OPTIONAL, INTENT(in) :: kt ! ice time-step 417 414 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icevar.F90
r11348 r11413 32 32 !! - vt_s(jpi,jpj) 33 33 !! - at_i(jpi,jpj) 34 !! - st_i(jpi,jpj) 34 35 !! - et_s(jpi,jpj) total snow heat content 35 36 !! - et_i(jpi,jpj) total ice thermal content … … 46 47 !! ice_var_zapneg : remove negative ice fields 47 48 !! ice_var_roundoff : remove negative values arising from roundoff erros 48 !! ice_var_itd : convert 1-cat to jpl-cat 49 !! ice_var_itd2 : convert N-cat to jpl-cat 49 !! ice_var_itd : convert N-cat to M-cat 50 50 !! ice_var_bv : brine volume 51 51 !! ice_var_enthalpy : compute ice and snow enthalpies from temperature … … 104 104 ! 105 105 ! ! integrated values 106 vt_i(:,:) = SUM( v_i(:,:,:) , dim=3 ) 107 vt_s(:,:) = SUM( v_s(:,:,:) , dim=3 ) 108 at_i(:,:) = SUM( a_i(:,:,:) , dim=3 ) 109 et_s(:,:) = SUM( SUM( e_s(:,:,:,:), dim=4 ), dim=3 ) 110 et_i(:,:) = SUM( SUM( e_i(:,:,:,:), dim=4 ), dim=3 ) 106 vt_i(:,:) = SUM( v_i (:,:,:) , dim=3 ) 107 vt_s(:,:) = SUM( v_s (:,:,:) , dim=3 ) 108 st_i(:,:) = SUM( sv_i(:,:,:) , dim=3 ) 109 at_i(:,:) = SUM( a_i (:,:,:) , dim=3 ) 110 et_s(:,:) = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 111 et_i(:,:) = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 111 112 ! 112 113 at_ip(:,:) = SUM( a_ip(:,:,:), dim=3 ) ! melt ponds … … 142 143 tm_si(:,:) = SUM( t_si(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 143 144 om_i (:,:) = SUM( oa_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 144 sm_i (:,:) = SUM( sv_i(:,:,:) , dim=3 )* z1_vt_i(:,:)145 sm_i (:,:) = st_i(:,:) * z1_vt_i(:,:) 145 146 ! 146 147 tm_i(:,:) = 0._wp … … 268 269 ! 269 270 ! integrated values 270 vt_i (:,:) = SUM( v_i , dim=3 )271 vt_s (:,:) = SUM( v_s , dim=3 )272 at_i (:,:) = SUM( a_i , dim=3 )271 vt_i (:,:) = SUM( v_i , dim=3 ) 272 vt_s (:,:) = SUM( v_s , dim=3 ) 273 at_i (:,:) = SUM( a_i , dim=3 ) 273 274 ! 274 275 END SUBROUTINE ice_var_glo2eqv … … 538 539 539 540 ! to be sure that at_i is the sum of a_i(jl) 540 at_i (:,:) = SUM( a_i(:,:,:), dim=3 ) 541 vt_i (:,:) = SUM( v_i(:,:,:), dim=3 ) 541 at_i (:,:) = SUM( a_i (:,:,:), dim=3 ) 542 vt_i (:,:) = SUM( v_i (:,:,:), dim=3 ) 543 !!clem add? 544 ! vt_s (:,:) = SUM( v_s (:,:,:), dim=3 ) 545 ! st_i (:,:) = SUM( sv_i(:,:,:), dim=3 ) 546 ! et_s(:,:) = SUM( SUM( e_s (:,:,:,:), dim=4 ), dim=3 ) 547 ! et_i(:,:) = SUM( SUM( e_i (:,:,:,:), dim=4 ), dim=3 ) 548 !!clem 542 549 543 550 ! open water = 1 if at_i=0 … … 932 939 IF ( i_fill == 1 ) THEN !-- case very thin ice: fill only category 1 933 940 ph_i(ji,1) = phti(ji) 934 pa_i 941 pa_i(ji,1) = pati (ji) 935 942 ELSE !-- case ice is thicker: fill categories >1 936 943 ! thickness … … 975 982 IF ( zconv < epsi06 ) itest(2) = 1 ! Test 2: volume conservation 976 983 ! 977 IF ( ph_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ?984 IF ( ph_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 ! Test 3: thickness of the last category is in-bounds ? 978 985 ! 979 986 itest(4) = 1 980 987 DO jl = 1, i_fill 981 IF ( pa_i(ji,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations988 IF ( pa_i(ji,jl) < 0._wp ) itest(4) = 0 ! Test 4: positivity of ice concentrations 982 989 END DO 983 990 ! !---------------------------- … … 1089 1096 ELSEIF( icat == 1 ) THEN ! input cat = 1 ! 1090 1097 ! ! ---------------------- ! 1091 CALL ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1), ph_i(:,:), ph_s(:,:), pa_i (:,:), & 1092 & ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 1098 CALL ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1), ph_i(:,:), ph_s(:,:), pa_i (:,:) ) 1099 !! CALL ice_var_itd_1cMc( phti(:,1), phts(:,1), pati (:,1), ph_i(:,:), ph_s(:,:), pa_i (:,:), & 1100 !! & ptmi(:,1), ptms(:,1), ptmsu(:,1), psmi(:,1), pt_i(:,:), pt_s(:,:), pt_su(:,:), ps_i(:,:) ) 1093 1101 ! ! ---------------------- ! 1094 1102 ELSEIF( jpl == 1 ) THEN ! output cat = 1 ! 1095 1103 ! ! ---------------------- ! 1096 CALL ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:), ph_i(:,1), ph_s(:,1), pa_i (:,1), & 1097 & ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) ) 1104 CALL ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:), ph_i(:,1), ph_s(:,1), pa_i (:,1) ) 1105 !! CALL ice_var_itd_Nc1c( phti(:,:), phts(:,:), pati (:,:), ph_i(:,1), ph_s(:,1), pa_i (:,1), & 1106 !! & ptmi(:,:), ptms(:,:), ptmsu(:,:), psmi(:,:), pt_i(:,1), pt_s(:,1), pt_su(:,1), ps_i(:,1) ) 1098 1107 ! ! ----------------------- ! 1099 1108 ELSE ! input cat /= output cat ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ICE/icewri.F90
r10911 r11413 50 50 INTEGER :: ji, jj, jk, jl ! dummy loop indices 51 51 REAL(wp) :: z2da, z2db, zrho1, zrho2 52 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zfast ! 2D workspace 52 REAL(wp) :: zmiss_val ! missing value retrieved from xios 53 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zfast ! 2D workspace 53 54 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00, zmsk05, zmsk15, zmsksn ! O%, 5% and 15% concentration mask and snow mask 54 55 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zmsk00l, zmsksnl ! cat masks … … 58 59 REAL(wp) :: zdiag_area_sh, zdiag_extt_sh, zdiag_volu_sh 59 60 !!------------------------------------------------------------------- 60 61 ! 61 62 IF( ln_timing ) CALL timing_start('icewri') 63 64 ! get missing value from xml 65 CALL iom_miss_val( 'icetemp', zmiss_val ) 62 66 63 67 ! brine volume … … 85 89 ! Standard outputs 86 90 !----------------- 87 zrho1 = ( rau0 - rhoi ) * r1_rau0 ; zrho2 = rhos * r1_rau091 zrho1 = ( rau0 - rhoi ) * r1_rau0 ; zrho2 = rhos * r1_rau0 88 92 ! masks 89 IF( iom_use('icemask' ) ) CALL iom_put( "icemask" , zmsk00 ) ! ice mask 0% 90 IF( iom_use('icemask05') ) CALL iom_put( "icemask05", zmsk05 ) ! ice mask 5% 91 IF( iom_use('icemask15') ) CALL iom_put( "icemask15", zmsk15 ) ! ice mask 15% 93 CALL iom_put( 'icemask' , zmsk00 ) ! ice mask 0% 94 CALL iom_put( 'icemask05', zmsk05 ) ! ice mask 5% 95 CALL iom_put( 'icemask15', zmsk15 ) ! ice mask 15% 96 CALL iom_put( 'icepres' , zmsk00 ) ! Ice presence (1 or 0) 92 97 ! 93 98 ! general fields 94 IF( iom_use('icemass' ) ) CALL iom_put( "icemass", rhoi * vt_i * zmsk00 ) ! Ice mass per cell area 95 IF( iom_use('snwmass' ) ) CALL iom_put( "snwmass", rhos * vt_s * zmsksn ) ! Snow mass per cell area 96 IF( iom_use('icepres' ) ) CALL iom_put( "icepres", zmsk00 ) ! Ice presence (1 or 0) 97 IF( iom_use('iceconc' ) ) CALL iom_put( "iceconc", at_i * zmsk00 ) ! ice concentration 98 IF( iom_use('icevolu' ) ) CALL iom_put( "icevolu", vt_i * zmsk00 ) ! ice volume = mean ice thickness over the cell 99 IF( iom_use('icethic' ) ) CALL iom_put( "icethic", hm_i * zmsk00 ) ! ice thickness 100 IF( iom_use('snwthic' ) ) CALL iom_put( "snwthic", hm_s * zmsk00 ) ! snw thickness 101 IF( iom_use('icebrv' ) ) CALL iom_put( "icebrv" , bvm_i * zmsk00 * 100. ) ! brine volume 102 IF( iom_use('iceage' ) ) CALL iom_put( "iceage" , om_i * zmsk15 / rday ) ! ice age 103 IF( iom_use('icehnew' ) ) CALL iom_put( "icehnew", ht_i_new ) ! new ice thickness formed in the leads 104 IF( iom_use('snwvolu' ) ) CALL iom_put( "snwvolu", vt_s * zmsksn ) ! snow volume 105 IF( iom_use('icefrb') ) THEN 99 IF( iom_use('icemass' ) ) CALL iom_put( 'icemass', vt_i * rhoi * zmsk00 ) ! Ice mass per cell area 100 IF( iom_use('snwmass' ) ) CALL iom_put( 'snwmass', vt_s * rhos * zmsksn ) ! Snow mass per cell area 101 IF( iom_use('iceconc' ) ) CALL iom_put( 'iceconc', at_i * zmsk00 ) ! ice concentration 102 IF( iom_use('icevolu' ) ) CALL iom_put( 'icevolu', vt_i * zmsk00 ) ! ice volume = mean ice thickness over the cell 103 IF( iom_use('icethic' ) ) CALL iom_put( 'icethic', hm_i * zmsk00 ) ! ice thickness 104 IF( iom_use('snwthic' ) ) CALL iom_put( 'snwthic', hm_s * zmsk00 ) ! snw thickness 105 IF( iom_use('icebrv' ) ) CALL iom_put( 'icebrv' , bvm_i* 100. * zmsk00 ) ! brine volume 106 IF( iom_use('iceage' ) ) CALL iom_put( 'iceage' , om_i / rday * zmsk15 + zmiss_val * ( 1._wp - zmsk15 ) ) ! ice age 107 IF( iom_use('icehnew' ) ) CALL iom_put( 'icehnew', ht_i_new ) ! new ice thickness formed in the leads 108 IF( iom_use('snwvolu' ) ) CALL iom_put( 'snwvolu', vt_s * zmsksn ) ! snow volume 109 IF( iom_use('icefrb' ) ) THEN ! Ice freeboard 106 110 z2d(:,:) = ( zrho1 * hm_i(:,:) - zrho2 * hm_s(:,:) ) 107 111 WHERE( z2d < 0._wp ) z2d = 0._wp 108 CALL iom_put( "icefrb" , z2d * zmsk00 ) ! Ice freeboard112 CALL iom_put( 'icefrb' , z2d * zmsk00 ) 109 113 ENDIF 110 !111 114 ! melt ponds 112 IF( iom_use('iceapnd' ) ) CALL iom_put( "iceapnd", at_ip * zmsk00 ) ! melt pond total fraction 113 IF( iom_use('icevpnd' ) ) CALL iom_put( "icevpnd", vt_ip * zmsk00 ) ! melt pond total volume per unit area 114 ! 115 IF( iom_use('iceapnd' ) ) CALL iom_put( 'iceapnd', at_ip * zmsk00 ) ! melt pond total fraction 116 IF( iom_use('icevpnd' ) ) CALL iom_put( 'icevpnd', vt_ip * zmsk00 ) ! melt pond total volume per unit area 115 117 ! salt 116 IF( iom_use('icesalt' ) ) CALL iom_put( "icesalt", sm_i * zmsk00 ) ! mean ice salinity 117 IF( iom_use('icesalm' ) ) CALL iom_put( "icesalm", SUM( sv_i, DIM = 3 ) * rhoi * 1.0e-3 * zmsk00 ) ! Mass of salt in sea ice per cell area 118 118 IF( iom_use('icesalt' ) ) CALL iom_put( 'icesalt', sm_i * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! mean ice salinity 119 IF( iom_use('icesalm' ) ) CALL iom_put( 'icesalm', st_i * rhoi * 1.0e-3 * zmsk00 ) ! Mass of salt in sea ice per cell area 119 120 ! heat 120 IF( iom_use('icetemp' ) ) CALL iom_put( "icetemp", ( tm_i - rt0 ) * zmsk00 ) ! ice mean temperature 121 IF( iom_use('snwtemp' ) ) CALL iom_put( "snwtemp", ( tm_s - rt0 ) * zmsksn ) ! snw mean temperature 122 IF( iom_use('icettop' ) ) CALL iom_put( "icettop", ( tm_su - rt0 ) * zmsk00 ) ! temperature at the ice surface 123 IF( iom_use('icetbot' ) ) CALL iom_put( "icetbot", ( t_bo - rt0 ) * zmsk00 ) ! temperature at the ice bottom 124 IF( iom_use('icetsni' ) ) CALL iom_put( "icetsni", ( tm_si - rt0 ) * zmsk00 ) ! temperature at the snow-ice interface 125 IF( iom_use('icehc' ) ) CALL iom_put( "icehc" , -et_i * zmsk00 ) ! ice heat content 126 IF( iom_use('snwhc' ) ) CALL iom_put( "snwhc" , -et_s * zmsksn ) ! snow heat content 127 121 IF( iom_use('icetemp' ) ) CALL iom_put( 'icetemp', ( tm_i - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! ice mean temperature 122 IF( iom_use('snwtemp' ) ) CALL iom_put( 'snwtemp', ( tm_s - rt0 ) * zmsksn + zmiss_val * ( 1._wp - zmsksn ) ) ! snw mean temperature 123 IF( iom_use('icettop' ) ) CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the ice surface 124 IF( iom_use('icetbot' ) ) CALL iom_put( 'icetbot', ( t_bo - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the ice bottom 125 IF( iom_use('icetsni' ) ) CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the snow-ice interface 126 IF( iom_use('icehc' ) ) CALL iom_put( 'icehc' , -et_i * zmsk00 ) ! ice heat content 127 IF( iom_use('snwhc' ) ) CALL iom_put( 'snwhc' , -et_s * zmsksn ) ! snow heat content 128 128 ! momentum 129 IF( iom_use('uice' ) ) CALL iom_put( "uice" , u_ice ) ! ice velocity u component 130 IF( iom_use('vice' ) ) CALL iom_put( "vice" , v_ice ) ! ice velocity v component 131 IF( iom_use('utau_ai' ) ) CALL iom_put( "utau_ai", utau_ice * zmsk00 ) ! Wind stress term in force balance (x) 132 IF( iom_use('vtau_ai' ) ) CALL iom_put( "vtau_ai", vtau_ice * zmsk00 ) ! Wind stress term in force balance (y) 133 134 IF( iom_use('icevel') .OR. iom_use('fasticepres') ) THEN 135 ! module of ice velocity 129 IF( iom_use('uice' ) ) CALL iom_put( 'uice' , u_ice ) ! ice velocity u 130 IF( iom_use('vice' ) ) CALL iom_put( 'vice' , v_ice ) ! ice velocity v 131 ! 132 IF( iom_use('icevel') .OR. iom_use('fasticepres') ) THEN ! module of ice velocity 136 133 DO jj = 2 , jpjm1 137 134 DO ji = 2 , jpim1 138 z2da = ( u_ice(ji,jj) + u_ice(ji-1,jj))139 z2db = ( v_ice(ji,jj) + v_ice(ji,jj-1))135 z2da = u_ice(ji,jj) + u_ice(ji-1,jj) 136 z2db = v_ice(ji,jj) + v_ice(ji,jj-1) 140 137 z2d(ji,jj) = 0.5_wp * SQRT( z2da * z2da + z2db * z2db ) 141 138 END DO 142 139 END DO 143 140 CALL lbc_lnk( 'icewri', z2d, 'T', 1. ) 144 IF( iom_use('icevel') ) CALL iom_put( "icevel" , z2d ) 145 146 ! record presence of fast ice 147 WHERE( z2d(:,:) < 5.e-04_wp .AND. zmsk15(:,:) == 1._wp ) ; zfast(:,:) = 1._wp 141 CALL iom_put( 'icevel', z2d ) 142 143 WHERE( z2d(:,:) < 5.e-04_wp .AND. zmsk15(:,:) == 1._wp ) ; zfast(:,:) = 1._wp ! record presence of fast ice 148 144 ELSEWHERE ; zfast(:,:) = 0._wp 149 145 END WHERE 150 IF( iom_use('fasticepres') ) CALL iom_put( "fasticepres", zfast )146 CALL iom_put( 'fasticepres', zfast ) 151 147 ENDIF 152 148 153 149 ! --- category-dependent fields --- ! 154 IF( iom_use('icemask_cat' ) ) CALL iom_put( "icemask_cat" , zmsk00l ) ! ice mask 0% 155 IF( iom_use('iceconc_cat' ) ) CALL iom_put( "iceconc_cat" , a_i * zmsk00l ) ! area for categories 156 IF( iom_use('icethic_cat' ) ) CALL iom_put( "icethic_cat" , h_i * zmsk00l ) ! thickness for categories 157 IF( iom_use('snwthic_cat' ) ) CALL iom_put( "snwthic_cat" , h_s * zmsksnl ) ! snow depth for categories 158 IF( iom_use('icesalt_cat' ) ) CALL iom_put( "icesalt_cat" , s_i * zmsk00l ) ! salinity for categories 159 IF( iom_use('iceage_cat' ) ) CALL iom_put( "iceage_cat" , o_i * zmsk00l / rday ) ! ice age 160 IF( iom_use('icetemp_cat' ) ) CALL iom_put( "icetemp_cat" , ( SUM( t_i(:,:,:,:), dim=3 ) * r1_nlay_i - rt0 ) * zmsk00l ) ! ice temperature 161 IF( iom_use('snwtemp_cat' ) ) CALL iom_put( "snwtemp_cat" , ( SUM( t_s(:,:,:,:), dim=3 ) * r1_nlay_s - rt0 ) * zmsksnl ) ! snow temperature 162 IF( iom_use('icettop_cat' ) ) CALL iom_put( "icettop_cat" , ( t_su - rt0 ) * zmsk00l ) ! surface temperature 163 IF( iom_use('icebrv_cat' ) ) CALL iom_put( "icebrv_cat" , bv_i * 100. * zmsk00l ) ! brine volume 164 IF( iom_use('iceapnd_cat' ) ) CALL iom_put( "iceapnd_cat" , a_ip * zmsk00l ) ! melt pond frac for categories 165 IF( iom_use('icehpnd_cat' ) ) CALL iom_put( "icehpnd_cat" , h_ip * zmsk00l ) ! melt pond frac for categories 166 IF( iom_use('iceafpnd_cat') ) CALL iom_put( "iceafpnd_cat", a_ip_frac * zmsk00l ) ! melt pond frac for categories 150 IF( iom_use('icemask_cat' ) ) CALL iom_put( 'icemask_cat' , zmsk00l ) ! ice mask 0% 151 IF( iom_use('iceconc_cat' ) ) CALL iom_put( 'iceconc_cat' , a_i * zmsk00l ) ! area for categories 152 IF( iom_use('icethic_cat' ) ) CALL iom_put( 'icethic_cat' , h_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! thickness for categories 153 IF( iom_use('snwthic_cat' ) ) CALL iom_put( 'snwthic_cat' , h_s * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow depth for categories 154 IF( iom_use('icesalt_cat' ) ) CALL iom_put( 'icesalt_cat' , s_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! salinity for categories 155 IF( iom_use('iceage_cat' ) ) CALL iom_put( 'iceage_cat' , o_i / rday * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice age 156 IF( iom_use('icetemp_cat' ) ) CALL iom_put( 'icetemp_cat' , ( SUM( t_i, dim=3 ) * r1_nlay_i - rt0 ) & 157 & * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice temperature 158 IF( iom_use('snwtemp_cat' ) ) CALL iom_put( 'snwtemp_cat' , ( SUM( t_s, dim=3 ) * r1_nlay_s - rt0 ) & 159 & * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow temperature 160 IF( iom_use('icettop_cat' ) ) CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! surface temperature 161 IF( iom_use('icebrv_cat' ) ) CALL iom_put( 'icebrv_cat' , bv_i * 100. * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! brine volume 162 IF( iom_use('iceapnd_cat' ) ) CALL iom_put( 'iceapnd_cat' , a_ip * zmsk00l ) ! melt pond frac for categories 163 IF( iom_use('icehpnd_cat' ) ) CALL iom_put( 'icehpnd_cat' , h_ip * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! melt pond frac for categories 164 IF( iom_use('iceafpnd_cat') ) CALL iom_put( 'iceafpnd_cat', a_ip_frac * zmsk00l ) ! melt pond frac for categories 167 165 168 166 !------------------ … … 170 168 !------------------ 171 169 ! trends 172 IF( iom_use('dmithd') ) CALL iom_put( "dmithd", - wfx_bog - wfx_bom - wfx_sum - wfx_sni - wfx_opw - wfx_lam - wfx_res ) ! Sea-ice mass change from thermodynamics173 IF( iom_use('dmidyn') ) CALL iom_put( "dmidyn", - wfx_dyn + rhoi * diag_trp_vi )! Sea-ice mass change from dynamics(kg/m2/s)174 IF( iom_use('dmiopw') ) CALL iom_put( "dmiopw", - wfx_opw )! Sea-ice mass change through growth in open water175 IF( iom_use('dmibog') ) CALL iom_put( "dmibog", - wfx_bog )! Sea-ice mass change through basal growth176 IF( iom_use('dmisni') ) CALL iom_put( "dmisni", - wfx_sni )! Sea-ice mass change through snow-to-ice conversion177 IF( iom_use('dmisum') ) CALL iom_put( "dmisum", - wfx_sum )! Sea-ice mass change through surface melting178 IF( iom_use('dmibom') ) CALL iom_put( "dmibom", - wfx_bom )! Sea-ice mass change through bottom melting179 IF( iom_use('dmtsub') ) CALL iom_put( "dmtsub", - wfx_sub )! Sea-ice mass change through evaporation and sublimation180 IF( iom_use('dmssub') ) CALL iom_put( "dmssub", - wfx_snw_sub )! Snow mass change through sublimation181 IF( iom_use('dmisub') ) CALL iom_put( "dmisub", - wfx_ice_sub )! Sea-ice mass change through sublimation182 IF( iom_use('dmsspr') ) CALL iom_put( "dmsspr", - wfx_spr )! Snow mass change through snow fall183 IF( iom_use('dmsssi') ) CALL iom_put( "dmsssi", wfx_sni*rhos*r1_rhoi )! Snow mass change through snow-to-ice conversion184 IF( iom_use('dmsmel') ) CALL iom_put( "dmsmel", - wfx_snw_sum )! Snow mass change through melt185 IF( iom_use('dmsdyn') ) CALL iom_put( "dmsdyn", - wfx_snw_dyn + rhos * diag_trp_vs )! Snow mass change through dynamics(kg/m2/s)186 170 IF( iom_use('dmithd') ) CALL iom_put( 'dmithd', - wfx_bog - wfx_bom - wfx_sum - wfx_sni - wfx_opw - wfx_lam - wfx_res ) ! Sea-ice mass change from thermodynamics 171 IF( iom_use('dmidyn') ) CALL iom_put( 'dmidyn', - wfx_dyn + rhoi * diag_trp_vi ) ! Sea-ice mass change from dynamics(kg/m2/s) 172 IF( iom_use('dmiopw') ) CALL iom_put( 'dmiopw', - wfx_opw ) ! Sea-ice mass change through growth in open water 173 IF( iom_use('dmibog') ) CALL iom_put( 'dmibog', - wfx_bog ) ! Sea-ice mass change through basal growth 174 IF( iom_use('dmisni') ) CALL iom_put( 'dmisni', - wfx_sni ) ! Sea-ice mass change through snow-to-ice conversion 175 IF( iom_use('dmisum') ) CALL iom_put( 'dmisum', - wfx_sum ) ! Sea-ice mass change through surface melting 176 IF( iom_use('dmibom') ) CALL iom_put( 'dmibom', - wfx_bom ) ! Sea-ice mass change through bottom melting 177 IF( iom_use('dmtsub') ) CALL iom_put( 'dmtsub', - wfx_sub ) ! Sea-ice mass change through evaporation and sublimation 178 IF( iom_use('dmssub') ) CALL iom_put( 'dmssub', - wfx_snw_sub ) ! Snow mass change through sublimation 179 IF( iom_use('dmisub') ) CALL iom_put( 'dmisub', - wfx_ice_sub ) ! Sea-ice mass change through sublimation 180 IF( iom_use('dmsspr') ) CALL iom_put( 'dmsspr', - wfx_spr ) ! Snow mass change through snow fall 181 IF( iom_use('dmsssi') ) CALL iom_put( 'dmsssi', wfx_sni*rhos*r1_rhoi ) ! Snow mass change through snow-to-ice conversion 182 IF( iom_use('dmsmel') ) CALL iom_put( 'dmsmel', - wfx_snw_sum ) ! Snow mass change through melt 183 IF( iom_use('dmsdyn') ) CALL iom_put( 'dmsdyn', - wfx_snw_dyn + rhos * diag_trp_vs ) ! Snow mass change through dynamics(kg/m2/s) 184 187 185 ! Global ice diagnostics 188 IF( iom_use('NH_icearea') .OR. iom_use('NH_icevolu') .OR. iom_use('NH_iceextt') ) THEN ! NH diagnostics 189 ! 190 WHERE( ff_t > 0._wp ) ; zmsk00(:,:) = 1.0e-12 191 ELSEWHERE ; zmsk00(:,:) = 0. 192 END WHERE 193 zdiag_area_nh = glob_sum( 'icewri', at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 194 zdiag_volu_nh = glob_sum( 'icewri', vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) ) 195 ! 196 WHERE( ff_t > 0._wp .AND. at_i > 0.15 ) ; zmsk00(:,:) = 1.0e-12 197 ELSEWHERE ; zmsk00(:,:) = 0. 198 END WHERE 199 zdiag_extt_nh = glob_sum( 'icewri', zmsk00(:,:) * e1e2t(:,:) ) 200 ! 201 IF( iom_use('NH_icearea') ) CALL iom_put( "NH_icearea" , zdiag_area_nh ) 202 IF( iom_use('NH_icevolu') ) CALL iom_put( "NH_icevolu" , zdiag_volu_nh ) 203 IF( iom_use('NH_iceextt') ) CALL iom_put( "NH_iceextt" , zdiag_extt_nh ) 186 IF( iom_use('NH_icearea') .OR. iom_use('NH_icevolu') .OR. iom_use('NH_iceextt') .OR. & 187 & iom_use('SH_icearea') .OR. iom_use('SH_icevolu') .OR. iom_use('SH_iceextt') ) THEN 188 ! 189 WHERE( ff_t(:,:) > 0._wp ) ; z2d(:,:) = 1._wp 190 ELSEWHERE ; z2d(:,:) = 0. 191 END WHERE 192 ! 193 IF( iom_use('NH_icearea') ) zdiag_area_nh = glob_sum( 'icewri', at_i * z2d * e1e2t * 1.e-12 ) 194 IF( iom_use('NH_icevolu') ) zdiag_volu_nh = glob_sum( 'icewri', vt_i * z2d * e1e2t * 1.e-12 ) 195 IF( iom_use('NH_iceextt') ) zdiag_extt_nh = glob_sum( 'icewri', z2d * e1e2t * 1.e-12 * zmsk15 ) 196 ! 197 IF( iom_use('SH_icearea') ) zdiag_area_sh = glob_sum( 'icewri', at_i * ( 1._wp - z2d ) * e1e2t * 1.e-12 ) 198 IF( iom_use('SH_icevolu') ) zdiag_volu_sh = glob_sum( 'icewri', vt_i * ( 1._wp - z2d ) * e1e2t * 1.e-12 ) 199 IF( iom_use('SH_iceextt') ) zdiag_extt_sh = glob_sum( 'icewri', ( 1._wp - z2d ) * e1e2t * 1.e-12 * zmsk15 ) 200 ! 201 CALL iom_put( 'NH_icearea' , zdiag_area_nh ) 202 CALL iom_put( 'NH_icevolu' , zdiag_volu_nh ) 203 CALL iom_put( 'NH_iceextt' , zdiag_extt_nh ) 204 CALL iom_put( 'SH_icearea' , zdiag_area_sh ) 205 CALL iom_put( 'SH_icevolu' , zdiag_volu_sh ) 206 CALL iom_put( 'SH_iceextt' , zdiag_extt_sh ) 204 207 ! 205 208 ENDIF 206 !207 IF( iom_use('SH_icearea') .OR. iom_use('SH_icevolu') .OR. iom_use('SH_iceextt') ) THEN ! SH diagnostics208 !209 WHERE( ff_t < 0._wp ); zmsk00(:,:) = 1.0e-12;210 ELSEWHERE ; zmsk00(:,:) = 0.211 END WHERE212 zdiag_area_sh = glob_sum( 'icewri', at_i(:,:) * zmsk00(:,:) * e1e2t(:,:) )213 zdiag_volu_sh = glob_sum( 'icewri', vt_i(:,:) * zmsk00(:,:) * e1e2t(:,:) )214 !215 WHERE( ff_t < 0._wp .AND. at_i > 0.15 ); zmsk00(:,:) = 1.0e-12216 ELSEWHERE ; zmsk00(:,:) = 0.217 END WHERE218 zdiag_extt_sh = glob_sum( 'icewri', zmsk00(:,:) * e1e2t(:,:) )219 !220 IF( iom_use('SH_icearea') ) CALL iom_put( "SH_icearea", zdiag_area_sh )221 IF( iom_use('SH_icevolu') ) CALL iom_put( "SH_icevolu", zdiag_volu_sh )222 IF( iom_use('SH_iceextt') ) CALL iom_put( "SH_iceextt", zdiag_extt_sh )223 !224 ENDIF225 209 ! 226 210 !!CR ! ! Create an output files (output.lim.abort.nc) if S < 0 or u > 20 m/s 227 211 !!CR ! IF( kindic < 0 ) CALL ice_wri_state( 'output.abort' ) 228 212 !!CR ! not yet implemented 229 !!gm idem for the ocean... Ask Seb how to get r ead of ioipsl....213 !!gm idem for the ocean... Ask Seb how to get rid of ioipsl.... 230 214 ! 231 215 IF( ln_timing ) CALL timing_stop('icewri') -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/BDY/bdydta.F90
r11348 r11413 415 415 bf_alias => bf(jp_bdyssh,jbdy:jbdy) ! alias for ssh structure of bdy number jbdy 416 416 bn_alias => bn_ssh ! alias for ssh structure of nambdy_dta 417 iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! length of this bdy on this MPI processus : onlyrim417 iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! length of this bdy on this MPI processus : used only on the rim 418 418 ENDIF 419 419 ! ===================== … … 427 427 llread = .NOT. ln_full_vel .AND. MOD(nn_dyn2d_dta(jbdy),2) == 1 ! don't get u2d from u3d and read NetCDF file 428 428 bf_alias => bf(jp_bdyu2d,jbdy:jbdy) ! alias for u2d structure of bdy number jbdy 429 bn_alias => bn_u2d ! alias for u2d structure of nambdy_dta 430 iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! length of this bdy on this MPI processus : only rim 429 bn_alias => bn_u2d ! alias for u2d structure of nambdy_dta 430 IF( ln_full_vel ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) ! will be computed from u3d -> need on the full bdy 431 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! used only on the rim 432 ENDIF 431 433 ENDIF 432 434 IF( jfld == jp_bdyv2d ) THEN … … 438 440 bf_alias => bf(jp_bdyv2d,jbdy:jbdy) ! alias for v2d structure of bdy number jbdy 439 441 bn_alias => bn_v2d ! alias for v2d structure of nambdy_dta 440 iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! length of this bdy on this MPI processus : only rim 442 IF( ln_full_vel ) THEN ; iszdim = idx_bdy(jbdy)%nblen(igrd) ! will be computed from v3d -> need on the full bdy 443 ELSE ; iszdim = idx_bdy(jbdy)%nblenrim(igrd) ! used only on the rim 444 ENDIF 441 445 ENDIF 442 446 ! ===================== -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/BDY/bdyini.F90
r11348 r11413 386 386 387 387 CALL bdy_read_seg( ib_bdy, nblendta(:,ib_bdy) ) 388 ! Now look for crossings in user (namelist) defined open boundary segments:389 IF( nbdysege > 0 .OR. nbdysegw > 0 .OR. nbdysegn > 0 .OR. nbdysegs > 0) CALL bdy_ctl_seg390 388 391 389 ELSE ! Read size of arrays in boundary coordinates file. … … 400 398 ! 401 399 END DO ! ib_bdy 400 401 ! Now look for crossings in user (namelist) defined open boundary segments: 402 IF( nbdysege > 0 .OR. nbdysegw > 0 .OR. nbdysegn > 0 .OR. nbdysegs > 0) CALL bdy_ctl_seg 402 403 403 404 ! Allocate arrays … … 1188 1189 &(jpjnob(ib).le.1)) CALL ctl_stop( 'nbdyind out of domain' ) 1189 1190 IF (jpindt(ib).ge.jpinft(ib)) CALL ctl_stop( 'Bdy start index is greater than end index' ) 1190 IF (jpindt(ib).l e.1 ) CALL ctl_stop( 'Start index out of domain' )1191 IF (jpinft(ib).g e.jpiglo) CALL ctl_stop( 'End index out of domain' )1191 IF (jpindt(ib).lt.1 ) CALL ctl_stop( 'Start index out of domain' ) 1192 IF (jpinft(ib).gt.jpiglo) CALL ctl_stop( 'End index out of domain' ) 1192 1193 END DO 1193 1194 ! … … 1197 1198 &(jpjsob(ib).le.1)) CALL ctl_stop( 'nbdyind out of domain' ) 1198 1199 IF (jpisdt(ib).ge.jpisft(ib)) CALL ctl_stop( 'Bdy start index is greater than end index' ) 1199 IF (jpisdt(ib).l e.1 ) CALL ctl_stop( 'Start index out of domain' )1200 IF (jpisft(ib).g e.jpiglo) CALL ctl_stop( 'End index out of domain' )1200 IF (jpisdt(ib).lt.1 ) CALL ctl_stop( 'Start index out of domain' ) 1201 IF (jpisft(ib).gt.jpiglo) CALL ctl_stop( 'End index out of domain' ) 1201 1202 END DO 1202 1203 ! … … 1206 1207 &(jpieob(ib).le.1)) CALL ctl_stop( 'nbdyind out of domain' ) 1207 1208 IF (jpjedt(ib).ge.jpjeft(ib)) CALL ctl_stop( 'Bdy start index is greater than end index' ) 1208 IF (jpjedt(ib).l e.1 ) CALL ctl_stop( 'Start index out of domain' )1209 IF (jpjeft(ib).g e.jpjglo) CALL ctl_stop( 'End index out of domain' )1209 IF (jpjedt(ib).lt.1 ) CALL ctl_stop( 'Start index out of domain' ) 1210 IF (jpjeft(ib).gt.jpjglo) CALL ctl_stop( 'End index out of domain' ) 1210 1211 END DO 1211 1212 ! … … 1215 1216 &(jpiwob(ib).le.1)) CALL ctl_stop( 'nbdyind out of domain' ) 1216 1217 IF (jpjwdt(ib).ge.jpjwft(ib)) CALL ctl_stop( 'Bdy start index is greater than end index' ) 1217 IF (jpjwdt(ib).l e.1 ) CALL ctl_stop( 'Start index out of domain' )1218 IF (jpjwft(ib).g e.jpjglo) CALL ctl_stop( 'End index out of domain' )1218 IF (jpjwdt(ib).lt.1 ) CALL ctl_stop( 'Start index out of domain' ) 1219 IF (jpjwft(ib).gt.jpjglo) CALL ctl_stop( 'End index out of domain' ) 1219 1220 ENDDO 1220 1221 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/BDY/bdyvol.F90
r11234 r11413 143 143 ! Check the cumulated transport through unstructured OBC once barotropic velocities corrected 144 144 ! ------------------------------------------------------ 145 IF( MOD( kt, n write ) == 0 .AND. ( kc == 1 ) ) THEN145 IF( MOD( kt, nn_write ) == 0 .AND. ( kc == 1 ) ) THEN 146 146 ! 147 147 ! compute residual transport across boundary -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DIA/diadct.F90
r11348 r11413 11 11 !! 3.4 ! 09/2011 (C Bricaud) 12 12 !!---------------------------------------------------------------------- 13 #if defined key_diadct 14 !!---------------------------------------------------------------------- 15 !! 'key_diadct' : 16 !!---------------------------------------------------------------------- 13 !! does not work with agrif 14 #if ! defined key_agrif 17 15 !!---------------------------------------------------------------------- 18 16 !! dia_dct : Compute the transport through a sec. … … 42 40 43 41 PUBLIC dia_dct ! routine called by step.F90 44 PUBLIC dia_dct_init ! routine called by opa.F90 45 PUBLIC diadct_alloc ! routine called by nemo_init in nemogcm.F90 46 PRIVATE readsec 47 PRIVATE removepoints 48 PRIVATE transport 49 PRIVATE dia_dct_wri 50 51 LOGICAL, PUBLIC, PARAMETER :: lk_diadct = .TRUE. !: model-data diagnostics flag 52 53 INTEGER :: nn_dct ! Frequency of computation 54 INTEGER :: nn_dctwri ! Frequency of output 55 INTEGER :: nn_secdebug ! Number of the section to debug 42 PUBLIC dia_dct_init ! routine called by nemogcm.F90 43 44 ! !!** namelist variables ** 45 LOGICAL, PUBLIC :: ln_diadct !: Calculate transport thru a section or not 46 INTEGER :: nn_dct ! Frequency of computation 47 INTEGER :: nn_dctwri ! Frequency of output 48 INTEGER :: nn_secdebug ! Number of the section to debug 56 49 57 50 INTEGER, PARAMETER :: nb_class_max = 10 … … 104 97 CONTAINS 105 98 106 INTEGER FUNCTION diadct_alloc() 107 !!---------------------------------------------------------------------- 108 !! *** FUNCTION diadct_alloc *** 109 !!---------------------------------------------------------------------- 110 INTEGER :: ierr(2) 111 !!---------------------------------------------------------------------- 112 113 ALLOCATE(transports_3d(nb_3d_vars,nb_sec_max,nb_point_max,jpk), STAT=ierr(1) ) 114 ALLOCATE(transports_2d(nb_2d_vars,nb_sec_max,nb_point_max) , STAT=ierr(2) ) 115 116 diadct_alloc = MAXVAL( ierr ) 117 IF( diadct_alloc /= 0 ) CALL ctl_stop( 'STOP', 'diadct_alloc: failed to allocate arrays' ) 118 119 END FUNCTION diadct_alloc 120 99 INTEGER FUNCTION diadct_alloc() 100 !!---------------------------------------------------------------------- 101 !! *** FUNCTION diadct_alloc *** 102 !!---------------------------------------------------------------------- 103 104 ALLOCATE( transports_3d(nb_3d_vars,nb_sec_max,nb_point_max,jpk), & 105 & transports_2d(nb_2d_vars,nb_sec_max,nb_point_max) , STAT=diadct_alloc ) 106 107 CALL mpp_sum( 'diadct', diadct_alloc ) 108 IF( diadct_alloc /= 0 ) CALL ctl_stop( 'STOP', 'diadct_alloc: failed to allocate arrays' ) 109 110 END FUNCTION diadct_alloc 121 111 122 112 SUBROUTINE dia_dct_init … … 130 120 INTEGER :: ios ! Local integer output status for namelist read 131 121 !! 132 NAMELIST/nam dct/nn_dct,nn_dctwri,nn_secdebug122 NAMELIST/nam_diadct/ln_diadct, nn_dct, nn_dctwri, nn_secdebug 133 123 !!--------------------------------------------------------------------- 134 124 135 REWIND( numnam_ref ) ! Namelist nam dct in reference namelist : Diagnostic: transport through sections136 READ ( numnam_ref, nam dct, IOSTAT = ios, ERR = 901)137 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam dct in reference namelist' )138 139 REWIND( numnam_cfg ) ! Namelist nam dct in configuration namelist : Diagnostic: transport through sections140 READ ( numnam_cfg, nam dct, IOSTAT = ios, ERR = 902 )141 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam dct in configuration namelist' )142 IF(lwm) WRITE ( numond, nam dct )125 REWIND( numnam_ref ) ! Namelist nam_diadct in reference namelist : Diagnostic: transport through sections 126 READ ( numnam_ref, nam_diadct, IOSTAT = ios, ERR = 901) 127 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diadct in reference namelist' ) 128 129 REWIND( numnam_cfg ) ! Namelist nam_diadct in configuration namelist : Diagnostic: transport through sections 130 READ ( numnam_cfg, nam_diadct, IOSTAT = ios, ERR = 902 ) 131 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diadct in configuration namelist' ) 132 IF(lwm) WRITE ( numond, nam_diadct ) 143 133 144 134 IF( lwp ) THEN … … 146 136 WRITE(numout,*) "diadct_init: compute transports through sections " 147 137 WRITE(numout,*) "~~~~~~~~~~~~~~~~~~~~~" 148 WRITE(numout,*) " Frequency of computation: nn_dct = ",nn_dct 149 WRITE(numout,*) " Frequency of write: nn_dctwri = ",nn_dctwri 138 WRITE(numout,*) " Calculate transport thru sections: ln_diadct = ", ln_diadct 139 WRITE(numout,*) " Frequency of computation: nn_dct = ", nn_dct 140 WRITE(numout,*) " Frequency of write: nn_dctwri = ", nn_dctwri 150 141 151 142 IF ( nn_secdebug .GE. 1 .AND. nn_secdebug .LE. nb_sec_max )THEN … … 155 146 ELSE ; WRITE(numout,*)" Wrong value for nn_secdebug : ",nn_secdebug 156 147 ENDIF 157 148 ENDIF 149 150 IF( ln_diadct ) THEN 151 ! control 158 152 IF(nn_dct .GE. nn_dctwri .AND. MOD(nn_dct,nn_dctwri) .NE. 0) & 159 & CALL ctl_stop( 'diadct: nn_dct should be smaller and a multiple of nn_dctwri' ) 160 153 & CALL ctl_stop( 'diadct: nn_dct should be smaller and a multiple of nn_dctwri' ) 154 155 ! allocate dia_dct arrays 156 IF( diadct_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'diadct_alloc: failed to allocate arrays' ) 157 158 !Read section_ijglobal.diadct 159 CALL readsec 160 161 !open output file 162 IF( lwm ) THEN 163 CALL ctl_opn( numdct_vol, 'volume_transport', 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 164 CALL ctl_opn( numdct_heat, 'heat_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 165 CALL ctl_opn( numdct_salt, 'salt_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 166 ENDIF 167 168 ! Initialise arrays to zero 169 transports_3d(:,:,:,:)=0.0 170 transports_2d(:,:,:) =0.0 171 ! 161 172 ENDIF 162 163 !Read section_ijglobal.diadct164 CALL readsec165 166 !open output file167 IF( lwm ) THEN168 CALL ctl_opn( numdct_vol, 'volume_transport', 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )169 CALL ctl_opn( numdct_heat, 'heat_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )170 CALL ctl_opn( numdct_salt, 'salt_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )171 ENDIF172 173 ! Initialise arrays to zero174 transports_3d(:,:,:,:)=0.0175 transports_2d(:,:,:) =0.0176 173 ! 177 174 END SUBROUTINE dia_dct_init … … 1241 1238 #else 1242 1239 !!---------------------------------------------------------------------- 1243 !! D efault option : Dummy module1240 !! Dummy module 1244 1241 !!---------------------------------------------------------------------- 1245 LOGICAL, PUBLIC, PARAMETER :: lk_diadct = .FALSE. !: diamht flag 1246 PUBLIC 1247 !! $Id$ 1242 LOGICAL, PUBLIC :: ln_diadct = .FALSE. 1248 1243 CONTAINS 1249 1250 SUBROUTINE dia_dct_init ! Dummy routine 1244 SUBROUTINE dia_dct_init 1251 1245 IMPLICIT NONE 1252 WRITE(*,*) 'dia_dct_init: You should not have seen this print! error?'1253 1246 END SUBROUTINE dia_dct_init 1254 1255 SUBROUTINE dia_dct( kt ) ! Dummy routine 1247 SUBROUTINE dia_dct( kt ) 1256 1248 IMPLICIT NONE 1257 INTEGER, INTENT( in ) :: kt ! ocean time-step index 1258 WRITE(*,*) 'dia_dct: You should not have seen this print! error?', kt 1249 INTEGER, INTENT(in) :: kt 1259 1250 END SUBROUTINE dia_dct 1251 ! 1260 1252 #endif 1261 1253 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DIA/diaharm.F90
r11348 r11413 5 5 !!====================================================================== 6 6 !! History : 3.1 ! 2007 (O. Le Galloudec, J. Chanut) Original code 7 !!----------------------------------------------------------------------8 #if defined key_diaharm9 !!----------------------------------------------------------------------10 !! 'key_diaharm'11 7 !!---------------------------------------------------------------------- 12 8 USE oce ! ocean dynamics and tracers variables … … 26 22 IMPLICIT NONE 27 23 PRIVATE 28 29 LOGICAL, PUBLIC, PARAMETER :: lk_diaharm = .TRUE.30 24 31 25 INTEGER, PARAMETER :: jpincomax = 2.*jpmax_harmo … … 33 27 34 28 ! !!** namelist variables ** 35 INTEGER :: nit000_han ! First time step used for harmonic analysis 36 INTEGER :: nitend_han ! Last time step used for harmonic analysis 37 INTEGER :: nstep_han ! Time step frequency for harmonic analysis 38 INTEGER :: nb_ana ! Number of harmonics to analyse 29 LOGICAL, PUBLIC :: ln_diaharm ! Choose tidal harmonic output or not 30 INTEGER :: nit000_han ! First time step used for harmonic analysis 31 INTEGER :: nitend_han ! Last time step used for harmonic analysis 32 INTEGER :: nstep_han ! Time step frequency for harmonic analysis 33 INTEGER :: nb_ana ! Number of harmonics to analyse 39 34 40 35 INTEGER , ALLOCATABLE, DIMENSION(:) :: name … … 53 48 CHARACTER (LEN=4), DIMENSION(jpmax_harmo) :: tname ! Names of tidal constituents ('M2', 'K1',...) 54 49 55 PUBLIC dia_harm ! routine called by step.F90 50 PUBLIC dia_harm ! routine called by step.F90 51 PUBLIC dia_harm_init ! routine called by nemogcm.F90 56 52 57 53 !!---------------------------------------------------------------------- … … 71 67 !! 72 68 !!-------------------------------------------------------------------- 73 INTEGER :: jh, nhan, jk, ji69 INTEGER :: jh, nhan, ji 74 70 INTEGER :: ios ! Local integer output status for namelist read 75 71 76 NAMELIST/nam_diaharm/ nit000_han, nitend_han, nstep_han, tname72 NAMELIST/nam_diaharm/ ln_diaharm, nit000_han, nitend_han, nstep_han, tname 77 73 !!---------------------------------------------------------------------- 78 74 … … 82 78 WRITE(numout,*) '~~~~~~~ ' 83 79 ENDIF 84 !85 IF( .NOT. ln_tide ) CALL ctl_stop( 'dia_harm_init : ln_tide must be true for harmonic analysis')86 !87 CALL tide_init_Wave88 80 ! 89 81 REWIND( numnam_ref ) ! Namelist nam_diaharm in reference namelist : Tidal harmonic analysis … … 96 88 ! 97 89 IF(lwp) THEN 98 WRITE(numout,*) 'First time step used for analysis: nit000_han= ', nit000_han 99 WRITE(numout,*) 'Last time step used for analysis: nitend_han= ', nitend_han 100 WRITE(numout,*) 'Time step frequency for harmonic analysis: nstep_han= ', nstep_han 90 WRITE(numout,*) 'Tidal diagnostics = ', ln_diaharm 91 WRITE(numout,*) ' First time step used for analysis: nit000_han= ', nit000_han 92 WRITE(numout,*) ' Last time step used for analysis: nitend_han= ', nitend_han 93 WRITE(numout,*) ' Time step frequency for harmonic analysis: nstep_han = ', nstep_han 101 94 ENDIF 102 95 103 ! Basic checks on harmonic analysis time window: 104 ! ---------------------------------------------- 105 IF( nit000 > nit000_han ) CALL ctl_stop( 'dia_harm_init : nit000_han must be greater than nit000', & 106 & ' restart capability not implemented' ) 107 IF( nitend < nitend_han ) CALL ctl_stop( 'dia_harm_init : nitend_han must be lower than nitend', & 108 & 'restart capability not implemented' ) 109 110 IF( MOD( nitend_han-nit000_han+1 , nstep_han ) /= 0 ) & 111 & CALL ctl_stop( 'dia_harm_init : analysis time span must be a multiple of nstep_han' ) 112 113 nb_ana = 0 114 DO jk=1,jpmax_harmo 115 DO ji=1,jpmax_harmo 116 IF(TRIM(tname(jk)) == Wave(ji)%cname_tide) THEN 117 nb_ana=nb_ana+1 118 ENDIF 119 END DO 120 END DO 121 ! 122 IF(lwp) THEN 123 WRITE(numout,*) ' Namelist nam_diaharm' 124 WRITE(numout,*) ' nb_ana = ', nb_ana 125 CALL flush(numout) 96 IF( ln_diaharm .AND. .NOT.ln_tide ) CALL ctl_stop( 'dia_harm_init : ln_tide must be true for harmonic analysis') 97 98 IF( ln_diaharm ) THEN 99 100 CALL tide_init_Wave 101 ! 102 ! Basic checks on harmonic analysis time window: 103 ! ---------------------------------------------- 104 IF( nit000 > nit000_han ) CALL ctl_stop( 'dia_harm_init : nit000_han must be greater than nit000', & 105 & ' restart capability not implemented' ) 106 IF( nitend < nitend_han ) CALL ctl_stop( 'dia_harm_init : nitend_han must be lower than nitend', & 107 & 'restart capability not implemented' ) 108 109 IF( MOD( nitend_han-nit000_han+1 , nstep_han ) /= 0 ) & 110 & CALL ctl_stop( 'dia_harm_init : analysis time span must be a multiple of nstep_han' ) 111 ! 112 nb_ana = 0 113 DO jh=1,jpmax_harmo 114 DO ji=1,jpmax_harmo 115 IF(TRIM(tname(jh)) == Wave(ji)%cname_tide) THEN 116 nb_ana=nb_ana+1 117 ENDIF 118 END DO 119 END DO 120 ! 121 IF(lwp) THEN 122 WRITE(numout,*) ' Namelist nam_diaharm' 123 WRITE(numout,*) ' nb_ana = ', nb_ana 124 CALL flush(numout) 125 ENDIF 126 ! 127 IF (nb_ana > jpmax_harmo) THEN 128 WRITE(ctmp1,*) ' nb_ana must be lower than jpmax_harmo' 129 WRITE(ctmp2,*) ' jpmax_harmo= ', jpmax_harmo 130 CALL ctl_stop( 'dia_harm_init', ctmp1, ctmp2 ) 131 ENDIF 132 133 ALLOCATE(name (nb_ana)) 134 DO jh=1,nb_ana 135 DO ji=1,jpmax_harmo 136 IF (TRIM(tname(jh)) == Wave(ji)%cname_tide) THEN 137 name(jh) = ji 138 EXIT 139 END IF 140 END DO 141 END DO 142 143 ! Initialize frequency array: 144 ! --------------------------- 145 ALLOCATE( ana_freq(nb_ana), ut(nb_ana), vt(nb_ana), ft(nb_ana) ) 146 147 CALL tide_harmo( ana_freq, vt, ut, ft, name, nb_ana ) 148 149 IF(lwp) WRITE(numout,*) 'Analysed frequency : ',nb_ana ,'Frequency ' 150 151 DO jh = 1, nb_ana 152 IF(lwp) WRITE(numout,*) ' : ',tname(jh),' ',ana_freq(jh) 153 END DO 154 155 ! Initialize temporary arrays: 156 ! ---------------------------- 157 ALLOCATE( ana_temp(jpi,jpj,2*nb_ana,3) ) 158 ana_temp(:,:,:,:) = 0._wp 159 126 160 ENDIF 127 !128 IF (nb_ana > jpmax_harmo) THEN129 WRITE(ctmp1,*) ' nb_ana must be lower than jpmax_harmo'130 WRITE(ctmp2,*) ' jpmax_harmo= ', jpmax_harmo131 CALL ctl_stop( 'dia_harm_init', ctmp1, ctmp2 )132 ENDIF133 134 ALLOCATE(name (nb_ana))135 DO jk=1,nb_ana136 DO ji=1,jpmax_harmo137 IF (TRIM(tname(jk)) == Wave(ji)%cname_tide) THEN138 name(jk) = ji139 EXIT140 END IF141 END DO142 END DO143 144 ! Initialize frequency array:145 ! ---------------------------146 ALLOCATE( ana_freq(nb_ana), ut(nb_ana), vt(nb_ana), ft(nb_ana) )147 148 CALL tide_harmo( ana_freq, vt, ut, ft, name, nb_ana )149 150 IF(lwp) WRITE(numout,*) 'Analysed frequency : ',nb_ana ,'Frequency '151 152 DO jh = 1, nb_ana153 IF(lwp) WRITE(numout,*) ' : ',tname(jh),' ',ana_freq(jh)154 END DO155 156 ! Initialize temporary arrays:157 ! ----------------------------158 ALLOCATE( ana_temp(jpi,jpj,2*nb_ana,3) )159 ana_temp(:,:,:,:) = 0._wp160 161 161 162 END SUBROUTINE dia_harm_init … … 177 178 !!-------------------------------------------------------------------- 178 179 IF( ln_timing ) CALL timing_start('dia_harm') 179 !180 IF( kt == nit000 ) CALL dia_harm_init181 180 ! 182 181 IF( kt >= nit000_han .AND. kt <= nitend_han .AND. MOD(kt,nstep_han) == 0 ) THEN … … 422 421 INTEGER, INTENT(in) :: init 423 422 ! 424 INTEGER :: ji_sd, jj_sd, ji1_sd, ji2_sd, j k1_sd, jk2_sd423 INTEGER :: ji_sd, jj_sd, ji1_sd, ji2_sd, jh1_sd, jh2_sd 425 424 REAL(wp) :: zval1, zval2, zx1 426 425 REAL(wp), DIMENSION(jpincomax) :: ztmpx, zcol1, zcol2 … … 434 433 ztmp3(:,:) = 0._wp 435 434 ! 436 DO j k1_sd = 1, nsparse437 DO j k2_sd = 1, nsparse438 nisparse(j k2_sd) = nisparse(jk2_sd)439 njsparse(j k2_sd) = njsparse(jk2_sd)440 IF( nisparse(j k2_sd) == nisparse(jk1_sd) ) THEN441 ztmp3(njsparse(j k1_sd),njsparse(jk2_sd)) = ztmp3(njsparse(jk1_sd),njsparse(jk2_sd)) &442 & + valuesparse(j k1_sd)*valuesparse(jk2_sd)435 DO jh1_sd = 1, nsparse 436 DO jh2_sd = 1, nsparse 437 nisparse(jh2_sd) = nisparse(jh2_sd) 438 njsparse(jh2_sd) = njsparse(jh2_sd) 439 IF( nisparse(jh2_sd) == nisparse(jh1_sd) ) THEN 440 ztmp3(njsparse(jh1_sd),njsparse(jh2_sd)) = ztmp3(njsparse(jh1_sd),njsparse(jh2_sd)) & 441 & + valuesparse(jh1_sd)*valuesparse(jh2_sd) 443 442 ENDIF 444 443 END DO … … 515 514 END SUBROUTINE SUR_DETERMINE 516 515 517 #else518 !!----------------------------------------------------------------------519 !! Default case : Empty module520 !!----------------------------------------------------------------------521 LOGICAL, PUBLIC, PARAMETER :: lk_diaharm = .FALSE.522 CONTAINS523 SUBROUTINE dia_harm ( kt ) ! Empty routine524 INTEGER, INTENT( IN ) :: kt525 WRITE(*,*) 'dia_harm: you should not have seen this print'526 END SUBROUTINE dia_harm527 #endif528 529 516 !!====================================================================== 530 517 END MODULE diaharm -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DIA/diawri.F90
r11363 r11413 437 437 !! define all the NETCDF files and fields 438 438 !! At each time step call histdef to compute the mean if ncessary 439 !! Each n write time step, output the instantaneous or mean fields439 !! Each nn_write time step, output the instantaneous or mean fields 440 440 !!---------------------------------------------------------------------- 441 441 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 455 455 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 456 456 !!---------------------------------------------------------------------- 457 !458 IF( ln_timing ) CALL timing_start('dia_wri')459 457 ! 460 458 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 464 462 465 463 ! 464 IF( nn_write == -1 ) RETURN ! we will never do any output 465 ! 466 IF( ln_timing ) CALL timing_start('dia_wri') 467 ! 466 468 ! 0. Initialisation 467 469 ! ----------------- … … 473 475 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 474 476 #if defined key_diainstant 475 zsto = n write * rdt477 zsto = nn_write * rdt 476 478 clop = "inst("//TRIM(clop)//")" 477 479 #else … … 479 481 clop = "ave("//TRIM(clop)//")" 480 482 #endif 481 zout = n write * rdt483 zout = nn_write * rdt 482 484 zmax = ( nitend - nit000 + 1 ) * rdt 483 485 … … 511 513 ! WRITE root name in date.file for use by postpro 512 514 IF(lwp) THEN 513 CALL dia_nam( clhstnam, n write,' ' )515 CALL dia_nam( clhstnam, nn_write,' ' ) 514 516 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 515 517 WRITE(inum,*) clhstnam … … 519 521 ! Define the T grid FILE ( nid_T ) 520 522 521 CALL dia_nam( clhstnam, n write, 'grid_T' )523 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 522 524 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 523 525 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 555 557 ! Define the U grid FILE ( nid_U ) 556 558 557 CALL dia_nam( clhstnam, n write, 'grid_U' )559 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 558 560 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 559 561 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 568 570 ! Define the V grid FILE ( nid_V ) 569 571 570 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename572 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 571 573 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 572 574 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 581 583 ! Define the W grid FILE ( nid_W ) 582 584 583 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename585 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 584 586 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 585 587 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 591 593 IF( ln_abl ) THEN 592 594 ! Define the ABL grid FILE ( nid_A ) 593 CALL dia_nam( clhstnam, n write, 'grid_ABL' )595 CALL dia_nam( clhstnam, nn_write, 'grid_ABL' ) 594 596 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 595 597 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 796 798 ! donne le nombre d'elements, et ndex la liste des indices a sortir 797 799 798 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN800 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 799 801 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 800 802 WRITE(numout,*) '~~~~~~ ' -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DOM/domain.F90
r11348 r11413 336 336 WRITE(numout,*) ' frequency of restart file nn_stock = ', nn_stock 337 337 ENDIF 338 #if ! defined key_iomput 338 339 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 340 #endif 339 341 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 340 342 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta … … 358 360 nleapy = nn_leapy 359 361 ninist = nn_istate 360 nstock = nn_stock361 nstocklist = nn_stocklist362 nwrite = nn_write363 362 neuler = nn_euler 364 363 IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN … … 369 368 ENDIF 370 369 ! ! control of output frequency 371 IF( nstock == 0 .OR. nstock > nitend ) THEN 372 WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 370 IF( .NOT. ln_rst_list ) THEN ! we use nn_stock 371 IF( nn_stock == -1 ) CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 372 IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 373 WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 374 CALL ctl_warn( ctmp1 ) 375 nn_stock = nitend 376 ENDIF 377 ENDIF 378 #if ! defined key_iomput 379 IF( nn_write == -1 ) CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 380 IF ( nn_write == 0 ) THEN 381 WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 373 382 CALL ctl_warn( ctmp1 ) 374 nstock = nitend 375 ENDIF 376 IF ( nwrite == 0 ) THEN 377 WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 378 CALL ctl_warn( ctmp1 ) 379 nwrite = nitend 380 ENDIF 383 nn_write = nitend 384 ENDIF 385 #endif 381 386 382 387 #if defined key_agrif -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DYN/dynspg_ts.F90
r11348 r11413 524 524 ! 525 525 ENDIF 526 ! sum over sub-time-steps to decide which baroclinic velocities to set to zero (zuwdav2 is only used when ln_wd_dl_bc=True)527 IF ( ln_wd_dl_bc ) THEN528 zuwdav2(1:jpim1,1:jpj ) = zuwdav2(1:jpim1,1:jpj ) + za2 * zuwdmask(1:jpim1,1:jpj ) ! not jpi-column529 zvwdav2(1:jpi ,1:jpjm1) = zvwdav2(1:jpi ,1:jpjm1) + za2 * zvwdmask(1:jpi ,1:jpjm1) ! not jpj-row530 END IF531 526 ! 532 527 ! … … 548 543 un_adv(:,:) = un_adv(:,:) + za2 * zhU(:,:) * r1_e2u(:,:) 549 544 vn_adv(:,:) = vn_adv(:,:) + za2 * zhV(:,:) * r1_e1v(:,:) 545 ! sum over sub-time-steps to decide which baroclinic velocities to set to zero (zuwdav2 is only used when ln_wd_dl_bc=True) 546 IF ( ln_wd_dl_bc ) THEN 547 zuwdav2(1:jpim1,1:jpj ) = zuwdav2(1:jpim1,1:jpj ) + za2 * zuwdmask(1:jpim1,1:jpj ) ! not jpi-column 548 zvwdav2(1:jpi ,1:jpjm1) = zvwdav2(1:jpi ,1:jpjm1) + za2 * zvwdmask(1:jpi ,1:jpjm1) ! not jpj-row 549 END IF 550 550 ! 551 551 ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DYN/dynzdf.F90
r10364 r11413 170 170 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) + akzu(ji,jj,jk+1) ) & 171 171 & / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 172 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) )173 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) )172 zWui = ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) / ze3ua 173 zWus = ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) / ze3ua 174 174 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWui, 0._wp ) 175 175 zws(ji,jj,jk) = zzws - zdt * MAX( zWus, 0._wp ) … … 185 185 zzwi = - zdt * ( avm(ji+1,jj,jk ) + avm(ji,jj,jk ) ) / ( ze3ua * e3uw_n(ji,jj,jk ) ) * wumask(ji,jj,jk ) 186 186 zzws = - zdt * ( avm(ji+1,jj,jk+1) + avm(ji,jj,jk+1) ) / ( ze3ua * e3uw_n(ji,jj,jk+1) ) * wumask(ji,jj,jk+1) 187 zWui = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) )188 zWus = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) )187 zWui = ( wi(ji,jj,jk ) + wi(ji+1,jj,jk ) ) / ze3ua 188 zWus = ( wi(ji,jj,jk+1) + wi(ji+1,jj,jk+1) ) / ze3ua 189 189 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWui, 0._wp ) 190 190 zws(ji,jj,jk) = zzws - zdt * MAX( zWus, 0._wp ) … … 199 199 ze3ua = ( 1._wp - r_vvl ) * e3u_n(ji,jj,1) + r_vvl * e3u_a(ji,jj,1) 200 200 zzws = - zdt * ( avm(ji+1,jj,2) + avm(ji ,jj,2) ) / ( ze3ua * e3uw_n(ji,jj,2) ) * wumask(ji,jj,2) 201 zWus = 0.5_wp * ( wi(ji ,jj,2) + wi(ji+1,jj,2) )201 zWus = ( wi(ji ,jj,2) + wi(ji+1,jj,2) ) / ze3ua 202 202 zws(ji,jj,1 ) = zzws - zdt * MAX( zWus, 0._wp ) 203 203 zwd(ji,jj,1 ) = 1._wp - zzws - zdt * ( MIN( zWus, 0._wp ) ) … … 336 336 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) + akzv(ji,jj,jk+1) ) & 337 337 & / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 338 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk )339 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1)338 zWvi = ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) / ze3va 339 zWvs = ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) / ze3va 340 340 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWvi, 0._wp ) 341 341 zws(ji,jj,jk) = zzws - zdt * MAX( zWvs, 0._wp ) … … 351 351 zzwi = - zdt * ( avm(ji,jj+1,jk ) + avm(ji,jj,jk ) ) / ( ze3va * e3vw_n(ji,jj,jk ) ) * wvmask(ji,jj,jk ) 352 352 zzws = - zdt * ( avm(ji,jj+1,jk+1) + avm(ji,jj,jk+1) ) / ( ze3va * e3vw_n(ji,jj,jk+1) ) * wvmask(ji,jj,jk+1) 353 zWvi = 0.5_wp * ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) * wvmask(ji,jj,jk )354 zWvs = 0.5_wp * ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) * wvmask(ji,jj,jk+1)353 zWvi = ( wi(ji,jj,jk ) + wi(ji,jj+1,jk ) ) / ze3va 354 zWvs = ( wi(ji,jj,jk+1) + wi(ji,jj+1,jk+1) ) / ze3va 355 355 zwi(ji,jj,jk) = zzwi + zdt * MIN( zWvi, 0._wp ) 356 356 zws(ji,jj,jk) = zzws - zdt * MAX( zWvs, 0._wp ) … … 365 365 ze3va = ( 1._wp - r_vvl ) * e3v_n(ji,jj,1) + r_vvl * e3v_a(ji,jj,1) 366 366 zzws = - zdt * ( avm(ji,jj+1,2) + avm(ji,jj,2) ) / ( ze3va * e3vw_n(ji,jj,2) ) * wvmask(ji,jj,2) 367 zWvs = 0.5_wp * ( wi(ji,jj ,2) + wi(ji,jj+1,2) )367 zWvs = ( wi(ji,jj ,2) + wi(ji,jj+1,2) ) / ze3va 368 368 zws(ji,jj,1 ) = zzws - zdt * MAX( zWvs, 0._wp ) 369 369 zwd(ji,jj,1 ) = 1._wp - zzws - zdt * ( MIN( zWvs, 0._wp ) ) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/DYN/sshwzv.F90
r10907 r11413 284 284 ! 285 285 INTEGER :: ji, jj, jk ! dummy loop indices 286 REAL(wp) :: zCu, zcff, z1_e3 w! local scalars286 REAL(wp) :: zCu, zcff, z1_e3t ! local scalars 287 287 REAL(wp) , PARAMETER :: Cu_min = 0.15_wp ! local parameters 288 288 REAL(wp) , PARAMETER :: Cu_max = 0.27 ! local parameters … … 297 297 IF(lwp) WRITE(numout,*) 'wAimp : Courant number-based partitioning of now vertical velocity ' 298 298 IF(lwp) WRITE(numout,*) '~~~~~ ' 299 wi(:,:,:) = 0._wp 299 300 ENDIF 300 301 ! … … 303 304 DO jj = 2, jpjm1 304 305 DO ji = 2, fs_jpim1 ! vector opt. 305 z1_e3 w = 1._wp / e3w_n(ji,jj,jk)306 Cu_adv(ji,jj,jk) = 2._wp * rdt * ( ( MAX( wn(ji,jj,jk) , 0._wp ) - MIN( wn(ji,jj,jk+1) , 0._wp ) ) 307 & + ( MAX( e2u(ji ,jj)*e3u w_n(ji ,jj,jk)*un(ji ,jj,jk), 0._wp ) - &308 & MIN( e2u(ji-1,jj)*e3u w_n(ji-1,jj,jk)*un(ji-1,jj,jk), 0._wp ) ) &309 & * r1_e1e2t(ji,jj) 310 & + ( MAX( e1v(ji,jj )*e3v w_n(ji,jj ,jk)*vn(ji,jj ,jk), 0._wp ) - &311 & MIN( e1v(ji,jj-1)*e3v w_n(ji,jj-1,jk)*vn(ji,jj-1,jk), 0._wp ) ) &312 & * r1_e1e2t(ji,jj) 313 & ) * z1_e3 w306 z1_e3t = 1._wp / e3t_n(ji,jj,jk) 307 Cu_adv(ji,jj,jk) = 2._wp * rdt * ( ( MAX( wn(ji,jj,jk) , 0._wp ) - MIN( wn(ji,jj,jk+1) , 0._wp ) ) & ! 2*rdt and not r2dt (for restartability) 308 & + ( MAX( e2u(ji ,jj)*e3u_n(ji ,jj,jk)*un(ji ,jj,jk), 0._wp ) - & 309 & MIN( e2u(ji-1,jj)*e3u_n(ji-1,jj,jk)*un(ji-1,jj,jk), 0._wp ) ) & 310 & * r1_e1e2t(ji,jj) & 311 & + ( MAX( e1v(ji,jj )*e3v_n(ji,jj ,jk)*vn(ji,jj ,jk), 0._wp ) - & 312 & MIN( e1v(ji,jj-1)*e3v_n(ji,jj-1,jk)*vn(ji,jj-1,jk), 0._wp ) ) & 313 & * r1_e1e2t(ji,jj) & 314 & ) * z1_e3t 314 315 END DO 315 316 END DO … … 320 321 ! 321 322 IF( MAXVAL( Cu_adv(:,:,:) ) > Cu_min ) THEN ! Quick check if any breaches anywhere 322 DO jk = 1, jpkm1! or scan Courant criterion and partition323 DO jk = jpkm1, 2, -1 ! or scan Courant criterion and partition 323 324 DO jj = 1, jpj ! w where necessary 324 325 DO ji = 1, jpi 325 326 ! 326 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk+1) ) 327 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) ) 328 ! alt: 329 ! IF ( wn(ji,jj,jk) > 0._wp ) THEN 330 ! zCu = Cu_adv(ji,jj,jk) 331 ! ELSE 332 ! zCu = Cu_adv(ji,jj,jk-1) 333 ! ENDIF 327 334 ! 328 335 IF( zCu <= Cu_min ) THEN !<-- Fully explicit … … 343 350 END DO 344 351 END DO 352 Cu_adv(:,:,1) = 0._wp 345 353 ELSE 346 354 ! Fully explicit everywhere -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/flo4rk.F90
r10068 r11413 4 4 !! Ocean floats : trajectory computation using a 4th order Runge-Kutta 5 5 !!====================================================================== 6 #if defined key_floats 7 !!---------------------------------------------------------------------- 8 !! 'key_floats' float trajectories 6 !! 9 7 !!---------------------------------------------------------------------- 10 8 !! flo_4rk : Compute the geographical position of floats … … 445 443 END SUBROUTINE flo_interp 446 444 447 # else448 !!----------------------------------------------------------------------449 !! No floats Dummy module450 !!----------------------------------------------------------------------451 #endif452 453 445 !!====================================================================== 454 446 END MODULE flo4rk -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/flo_oce.F90
r10425 r11413 6 6 !! History : OPA ! 1999-10 (CLIPPER projet) 7 7 !! NEMO 1.0 ! 2002-11 (G. Madec, A. Bozec) F90: Free form and module 8 !!----------------------------------------------------------------------9 #if defined key_floats10 !!----------------------------------------------------------------------11 !! 'key_floats' drifting floats12 8 !!---------------------------------------------------------------------- 13 9 USE par_oce ! ocean parameters … … 20 16 PUBLIC flo_oce_alloc ! Routine called in floats.F90 21 17 22 LOGICAL, PUBLIC, PARAMETER :: lk_floats = .TRUE. !: float flag23 24 18 !! float parameters 25 19 !! ---------------- 20 LOGICAL, PUBLIC :: ln_floats !: Activate floats or not 26 21 INTEGER, PUBLIC :: jpnfl !: total number of floats during the run 27 22 INTEGER, PUBLIC :: jpnnewflo !: number of floats added in a new run … … 68 63 END FUNCTION flo_oce_alloc 69 64 70 #else71 !!----------------------------------------------------------------------72 !! Default option : NO drifting floats73 !!----------------------------------------------------------------------74 LOGICAL, PUBLIC, PARAMETER :: lk_floats = .FALSE. !: float flag75 #endif76 77 65 !!====================================================================== 78 66 END MODULE flo_oce -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/floats.F90
r11348 r11413 7 7 !! NEMO 1.0 ! 2002-06 (A. Bozec) F90, Free form and module 8 8 !!---------------------------------------------------------------------- 9 #if defined key_floats 10 !!---------------------------------------------------------------------- 11 !! 'key_floats' float trajectories 9 !! 12 10 !!---------------------------------------------------------------------- 13 11 !! flo_stp : float trajectories computation … … 30 28 31 29 PUBLIC flo_stp ! routine called by step.F90 32 PUBLIC flo_init ! routine called by opa.F9030 PUBLIC flo_init ! routine called by nemogcm.F90 33 31 34 32 !!---------------------------------------------------------------------- … … 81 79 INTEGER :: ios ! Local integer output status for namelist read 82 80 ! 83 NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii81 NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 84 82 !!--------------------------------------------------------------------- 85 83 ! … … 100 98 WRITE(numout,*) 101 99 WRITE(numout,*) ' Namelist floats :' 102 WRITE(numout,*) ' number of floats jpnfl = ', jpnfl 103 WRITE(numout,*) ' number of new floats jpnflnewflo = ', jpnnewflo 104 WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo 105 WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl 106 WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl 107 WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo 108 WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 109 WRITE(numout,*) ' Use of ariane convention ln_ariane = ', ln_ariane 110 WRITE(numout,*) ' ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii 100 WRITE(numout,*) ' Activate floats or not ln_floats = ', ln_floats 101 WRITE(numout,*) ' number of floats jpnfl = ', jpnfl 102 WRITE(numout,*) ' number of new floats jpnflnewflo = ', jpnnewflo 103 WRITE(numout,*) ' restart ln_rstflo = ', ln_rstflo 104 WRITE(numout,*) ' frequency of float output file nn_writefl = ', nn_writefl 105 WRITE(numout,*) ' frequency of float restart file nn_stockfl = ', nn_stockfl 106 WRITE(numout,*) ' Argo type floats ln_argo = ', ln_argo 107 WRITE(numout,*) ' Computation of T trajectories ln_flork4 = ', ln_flork4 108 WRITE(numout,*) ' Use of ariane convention ln_ariane = ', ln_ariane 109 WRITE(numout,*) ' ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii 111 110 112 111 ENDIF 113 112 ! 114 ! ! allocate floats arrays 115 IF( flo_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) 116 ! 117 ! ! allocate flodom arrays 118 IF( flo_dom_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) 119 ! 120 ! ! allocate flowri arrays 121 IF( flo_wri_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) 122 ! 123 ! ! allocate florst arrays 124 IF( flo_rst_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 125 ! 126 jpnrstflo = jpnfl-jpnnewflo ! memory allocation 127 ! 128 DO jfl = 1, jpnfl ! vertical axe for netcdf IOM ouput 129 nfloat(jfl) = jfl 130 END DO 131 ! 132 CALL flo_dom ! compute/read initial position of floats 133 ! 134 wb(:,:,:) = wn(:,:,:) ! set wb for computation of floats trajectories at the first time step 113 IF( ln_floats ) THEN 114 ! ! allocate floats arrays 115 IF( flo_oce_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) 116 ! 117 ! ! allocate flodom arrays 118 IF( flo_dom_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) 119 ! 120 ! ! allocate flowri arrays 121 IF( flo_wri_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) 122 ! 123 ! ! allocate florst arrays 124 IF( flo_rst_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 125 ! 126 jpnrstflo = jpnfl-jpnnewflo ! memory allocation 127 ! 128 DO jfl = 1, jpnfl ! vertical axe for netcdf IOM ouput 129 nfloat(jfl) = jfl 130 END DO 131 ! 132 CALL flo_dom ! compute/read initial position of floats 133 ! 134 wb(:,:,:) = wn(:,:,:) ! set wb for computation of floats trajectories at the first time step 135 ! 136 ENDIF 135 137 ! 136 138 END SUBROUTINE flo_init 137 139 138 # else139 !!----------------------------------------------------------------------140 !! Default option : Empty module141 !!----------------------------------------------------------------------142 CONTAINS143 SUBROUTINE flo_stp( kt ) ! Empty routine144 IMPLICIT NONE145 INTEGER, INTENT( in ) :: kt146 WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt147 END SUBROUTINE flo_stp148 SUBROUTINE flo_init ! Empty routine149 IMPLICIT NONE150 END SUBROUTINE flo_init151 #endif152 153 140 !!====================================================================== 154 141 END MODULE floats -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/floblk.F90
r10425 r11413 4 4 !! Ocean floats : trajectory computation 5 5 !!====================================================================== 6 #if defined key_floats 7 !!---------------------------------------------------------------------- 8 !! 'key_floats' float trajectories 6 !! 9 7 !!---------------------------------------------------------------------- 10 8 !! flotblk : compute float trajectories with Blanke algorithme … … 369 367 END SUBROUTINE flo_blk 370 368 371 # else372 !!----------------------------------------------------------------------373 !! Default option Empty module374 !!----------------------------------------------------------------------375 CONTAINS376 SUBROUTINE flo_blk ! Empty routine377 END SUBROUTINE flo_blk378 #endif379 380 369 !!====================================================================== 381 370 END MODULE floblk -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/flodom.F90
r10425 r11413 6 6 !! History : OPA ! 1998-07 (Y.Drillet, CLIPPER) Original code 7 7 !! NEMO 3.3 ! 2011-09 (C.Bricaud,S.Law-Chune Mercator-Ocean): add ARIANE convention + comsecitc changes 8 !!----------------------------------------------------------------------9 #if defined key_floats10 !!----------------------------------------------------------------------11 !! 'key_floats' float trajectories12 8 !!---------------------------------------------------------------------- 13 9 !! flo_dom : initialization of floats … … 455 451 END FUNCTION flo_dom_alloc 456 452 457 458 #else459 !!----------------------------------------------------------------------460 !! Default option Empty module461 !!----------------------------------------------------------------------462 CONTAINS463 SUBROUTINE flo_dom ! Empty routine464 WRITE(*,*) 'flo_dom: : You should not have seen this print! error?'465 END SUBROUTINE flo_dom466 #endif467 468 453 !!====================================================================== 469 454 END MODULE flodom -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/florst.F90
r10425 r11413 8 8 !! NEMO 1.0 ! 2002-10 (A. Bozec) F90 : Free form and module 9 9 !! 3.2 ! 2010-08 (slaw, cbricaud): netcdf outputs and others 10 !!----------------------------------------------------------------------11 #if defined key_floats12 !!----------------------------------------------------------------------13 !! 'key_floats' float trajectories14 10 !!---------------------------------------------------------------------- 15 11 USE flo_oce ! ocean drifting floats … … 125 121 END SUBROUTINE flo_rst 126 122 127 # else128 !!----------------------------------------------------------------------129 !! Default option Empty module130 !!----------------------------------------------------------------------131 CONTAINS132 SUBROUTINE flo_rst ! Empty routine133 END SUBROUTINE flo_rst134 #endif135 136 123 !!======================================================================= 137 124 END MODULE florst -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/FLO/flowri.F90
r10425 r11413 10 10 !! NEMO 1.0 ! 2002-10 (A. Bozec) F90 : Free form and module 11 11 !! 3.2 ! 2010-08 (slaw, cbricaud): netcdf outputs and others 12 !!----------------------------------------------------------------------13 #if defined key_floats14 !!----------------------------------------------------------------------15 !! 'key_floats' float trajectories16 12 !!---------------------------------------------------------------------- 17 13 USE flo_oce ! ocean drifting floats … … 179 175 CALL ctl_opn( numflo, 'trajec_float', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 180 176 irecflo = NINT( (nitend-nn_it000) / FLOAT(nn_writefl) ) 181 WRITE(numflo,*) cexper,no,irecflo,jpnfl,nn_writefl177 WRITE(numflo,*) cexper, irecflo, jpnfl, nn_writefl 182 178 ENDIF 183 179 … … 255 251 256 252 istart = (/jfl,irec/) 257 icfl = INT( tpkfl(jfl) ) ! K-index of the nearest point before 258 259 CALL flioputv( numflo , 'traj_lon' , zlon(jfl) , start=istart ) 260 CALL flioputv( numflo , 'traj_lat' , zlat(jfl) , start=istart ) 261 CALL flioputv( numflo , 'traj_depth' , zdep(jfl) , start=istart ) 262 CALL flioputv( numflo , 'traj_temp' , ztemp(icfl,jfl) , start=istart ) 263 CALL flioputv( numflo , 'traj_salt' , zsal(icfl,jfl) , start=istart ) 264 CALL flioputv( numflo , 'traj_dens' , zrho(icfl,jfl) , start=istart ) 253 254 CALL flioputv( numflo , 'traj_lon' , zlon(jfl), start=istart ) 255 CALL flioputv( numflo , 'traj_lat' , zlat(jfl), start=istart ) 256 CALL flioputv( numflo , 'traj_depth' , zdep(jfl), start=istart ) 257 CALL flioputv( numflo , 'traj_temp' , ztem(jfl), start=istart ) 258 CALL flioputv( numflo , 'traj_salt' , zsal(jfl), start=istart ) 259 CALL flioputv( numflo , 'traj_dens' , zrho(jfl), start=istart ) 265 260 266 261 ENDDO … … 277 272 END SUBROUTINE flo_wri 278 273 279 280 # else281 !!----------------------------------------------------------------------282 !! Default option Empty module283 !!----------------------------------------------------------------------284 CONTAINS285 SUBROUTINE flo_wri ! Empty routine286 END SUBROUTINE flo_wri287 #endif288 289 274 !!======================================================================= 290 275 END MODULE flowri -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/in_out_manager.F90
r11348 r11413 80 80 INTEGER :: nleapy !: Leap year calendar flag (0/1 or 30) 81 81 INTEGER :: ninist !: initial state output flag (0/1) 82 INTEGER :: nwrite !: model standard output frequency83 INTEGER :: nstock !: restart file frequency84 INTEGER, DIMENSION(10) :: nstocklist !: restart dump times85 82 86 83 !!---------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/iom.F90
r11360 r11413 58 58 PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get 59 59 PUBLIC iom_chkatt, iom_getatt, iom_putatt, iom_getszuld, iom_rstput, iom_delay_rst, iom_put 60 PUBLIC iom_use, iom_context_finalize 60 PUBLIC iom_use, iom_context_finalize, iom_miss_val 61 61 62 62 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d … … 230 230 za_bnds(2,:) = ght_abl(2:jpka ) + e3w_abl(2:jpka) 231 231 CALL iom_set_axis_attr( "ghw_abl", bounds=za_bnds ) 232 !233 # if defined key_floats234 232 CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 235 # endif236 233 # if defined key_si3 237 234 CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) ) … … 1689 1686 CHARACTER(LEN=*), INTENT(in) :: cdname 1690 1687 REAL(wp) , INTENT(in) :: pfield0d 1691 REAL(wp) , DIMENSION(jpi,jpj) :: zz ! masson1688 !! REAL(wp) , DIMENSION(jpi,jpj) :: zz ! masson 1692 1689 #if defined key_iomput 1693 zz(:,:)=pfield0d1694 CALL xios_send_field(cdname, zz)1695 !CALL xios_send_field(cdname, (/pfield0d/))1690 !!clem zz(:,:)=pfield0d 1691 !!clem CALL xios_send_field(cdname, zz) 1692 CALL xios_send_field(cdname, (/pfield0d/)) 1696 1693 #else 1697 1694 IF( .FALSE. ) WRITE(numout,*) cdname, pfield0d ! useless test to avoid compilation warnings … … 2406 2403 !! NOT 'key_iomput' a few dummy routines 2407 2404 !!---------------------------------------------------------------------- 2408 2409 2405 SUBROUTINE iom_setkt( kt, cdname ) 2410 2406 INTEGER , INTENT(in):: kt … … 2421 2417 2422 2418 LOGICAL FUNCTION iom_use( cdname ) 2423 !!----------------------------------------------------------------------2424 !!----------------------------------------------------------------------2425 2419 CHARACTER(LEN=*), INTENT(in) :: cdname 2426 !!----------------------------------------------------------------------2427 2420 #if defined key_iomput 2428 2421 iom_use = xios_field_is_active( cdname ) … … 2431 2424 #endif 2432 2425 END FUNCTION iom_use 2433 2426 2427 SUBROUTINE iom_miss_val( cdname, pmiss_val ) 2428 CHARACTER(LEN=*), INTENT(in ) :: cdname 2429 REAL(wp) , INTENT(out) :: pmiss_val 2430 #if defined key_iomput 2431 ! get missing value 2432 CALL xios_get_field_attr( cdname, default_value = pmiss_val ) 2433 #else 2434 IF( .FALSE. ) WRITE(numout,*) cdname, pmiss_val ! useless test to avoid compilation warnings 2435 #endif 2436 END SUBROUTINE iom_miss_val 2437 2434 2438 !!====================================================================== 2435 2439 END MODULE iom -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/restart.F90
r10425 r11413 70 70 IF( ln_rst_list ) THEN 71 71 nrst_lst = 1 72 nitrst = n stocklist( nrst_lst )72 nitrst = nn_stocklist( nrst_lst ) 73 73 ELSE 74 74 nitrst = nitend 75 75 ENDIF 76 76 ENDIF 77 78 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 77 79 78 80 ! frequency-based restart dumping (nn_stock) 79 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, n stock ) == 0 ) THEN81 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 80 82 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 81 nitrst = kt + n stock - 1 ! define the next value of nitrst for restart writing83 nitrst = kt + nn_stock - 1 ! define the next value of nitrst for restart writing 82 84 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 83 85 ENDIF … … 85 87 ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1) 86 88 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 87 IF( kt == nitrst - 1 .OR. n stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN89 IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 88 90 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 89 91 ! beware of the format used to write kt (default is i8.8, that should be large enough...) … … 184 186 lrst_oce = .FALSE. 185 187 IF( ln_rst_list ) THEN 186 nrst_lst = MIN(nrst_lst + 1, SIZE(n stocklist,1))187 nitrst = n stocklist( nrst_lst )188 nrst_lst = MIN(nrst_lst + 1, SIZE(nn_stocklist,1)) 189 nitrst = nn_stocklist( nrst_lst ) 188 190 ENDIF 189 191 ENDIF -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/LBC/lib_mpp.F90
r11348 r11413 67 67 PUBLIC mpp_report 68 68 PUBLIC tic_tac 69 #if ! defined key_mpp_mpi 70 PUBLIC MPI_Wtime 71 #endif 69 72 70 73 !! * Interfaces … … 660 663 661 664 662 SUBROUTINE mppstop( ld final, ld_force_abort )665 SUBROUTINE mppstop( ld_abort ) 663 666 !!---------------------------------------------------------------------- 664 667 !! *** routine mppstop *** … … 667 670 !! 668 671 !!---------------------------------------------------------------------- 669 LOGICAL, OPTIONAL, INTENT(in) :: ldfinal ! source process number 670 LOGICAL, OPTIONAL, INTENT(in) :: ld_force_abort ! source process number 671 LOGICAL :: llfinal, ll_force_abort 672 LOGICAL, OPTIONAL, INTENT(in) :: ld_abort ! source process number 673 LOGICAL :: ll_abort 672 674 INTEGER :: info 673 675 !!---------------------------------------------------------------------- 674 llfinal = .FALSE. 675 IF( PRESENT(ldfinal) ) llfinal = ldfinal 676 ll_force_abort = .FALSE. 677 IF( PRESENT(ld_force_abort) ) ll_force_abort = ld_force_abort 678 ! 679 #if defined key_mpp_mpi 680 IF(ll_force_abort) THEN 676 ll_abort = .FALSE. 677 IF( PRESENT(ld_abort) ) ll_abort = ld_abort 678 ! 679 #if defined key_mpp_mpi 680 IF(ll_abort) THEN 681 681 CALL mpi_abort( MPI_COMM_WORLD ) 682 682 ELSE … … 685 685 ENDIF 686 686 #endif 687 IF( .NOT. llfinal) STOP 123687 IF( ll_abort ) STOP 123 688 688 ! 689 689 END SUBROUTINE mppstop … … 1059 1059 INTEGER , INTENT( out) :: ierror 1060 1060 END SUBROUTINE mpi_wait 1061 1062 1063 FUNCTION MPI_Wtime() 1064 REAL(wp) :: MPI_Wtime 1065 MPI_Wtime = -1. 1066 END FUNCTION MPI_Wtime 1061 1067 #endif 1062 1068 … … 1109 1115 WRITE(numout,*) 'huge E-R-R-O-R : immediate stop' 1110 1116 WRITE(numout,*) 1111 CALL mppstop( ld_ force_abort = .true. )1117 CALL mppstop( ld_abort = .true. ) 1112 1118 ENDIF 1113 1119 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/LBC/mppini.F90
r11348 r11413 154 154 LOGICAL :: llbest, llauto 155 155 LOGICAL :: llwrtlay 156 LOGICAL :: ln_listonly 156 157 INTEGER, ALLOCATABLE, DIMENSION(:) :: iin, ii_nono, ii_noea ! 1D workspace 157 158 INTEGER, ALLOCATABLE, DIMENSION(:) :: ijn, ii_noso, ii_nowe ! - - … … 168 169 & rn_ice_tem, rn_ice_sal, rn_ice_age, & 169 170 & ln_vol, nn_volctl, nn_rimwidth 170 NAMELIST/nammpp/ jpni, jpnj, ln_nnogather 171 NAMELIST/nammpp/ jpni, jpnj, ln_nnogather, ln_listonly 171 172 !!---------------------------------------------------------------------- 172 173 ! … … 206 207 IF( ln_read_cfg ) CALL iom_open( cn_domcfg, numbot ) 207 208 IF( ln_bdy .AND. ln_mask_file ) CALL iom_open( cn_mask_file, numbdy ) 209 ! 210 IF( ln_listonly ) CALL mpp_init_bestpartition( MAX(mppsize,jpni*jpnj), ldlist = .TRUE. ) ! must be done by all core 208 211 ! 209 212 ! 1. Dimension arrays for subdomains … … 268 271 CALL ctl_stop( ctmp1, ctmp2, ctmp3, ' ', ctmp4, ' ' ) 269 272 CALL mpp_init_bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core 270 CALL ctl_stop( 'STOP' )271 273 ENDIF 272 274 … … 293 295 ENDIF 294 296 CALL mpp_init_bestpartition( mppsize, ldlist = .TRUE. ) ! must be done by all core 295 CALL ctl_stop( 'STOP' )296 297 ENDIF 297 298 … … 843 844 INTEGER :: isziref, iszjref 844 845 INTEGER :: inbij, iszij 845 INTEGER :: inbimax, inbjmax, inbijmax 846 INTEGER :: inbimax, inbjmax, inbijmax, inbijold 846 847 INTEGER :: isz0, isz1 847 848 INTEGER, DIMENSION( :), ALLOCATABLE :: indexok … … 968 969 DEALLOCATE( indexok, inbi1, inbj1, iszi1, iszj1 ) 969 970 970 IF( llist ) THEN ! we print about 21 best partitions971 IF( llist ) THEN 971 972 IF(lwp) THEN 972 973 WRITE(numout,*) 973 WRITE(numout, 974 WRITE(numout, '(a,i5,a)') ' list of the best partitions around ', knbij, ' mpi processes'975 WRITE(numout, *) ' --------------------------------------', '-----', '--------------'974 WRITE(numout,*) ' For your information:' 975 WRITE(numout,*) ' list of the best partitions including land supression' 976 WRITE(numout,*) ' -----------------------------------------------------' 976 977 WRITE(numout,*) 977 978 END IF 978 iitarget = MINLOC( inbi0(:)*inbj0(:), mask = inbi0(:)*inbj0(:) >= knbij, dim = 1 ) 979 DO ji = MAX(1,iitarget-10), MIN(isz0,iitarget+10) 979 ji = isz0 ! initialization with the largest value 980 ALLOCATE( llisoce(inbi0(ji), inbj0(ji)) ) 981 CALL mpp_init_isoce( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum) 982 inbijold = COUNT(llisoce) 983 DEALLOCATE( llisoce ) 984 DO ji =isz0-1,1,-1 980 985 ALLOCATE( llisoce(inbi0(ji), inbj0(ji)) ) 981 986 CALL mpp_init_isoce( inbi0(ji), inbj0(ji), llisoce ) ! Warning: must be call by all cores (call mpp_sum) 982 987 inbij = COUNT(llisoce) 983 988 DEALLOCATE( llisoce ) 984 IF(lwp) WRITE(numout,'(a, i5, a, i5, a, i4, a, i4, a, i9, a, i5, a, i5, a)') & 985 & 'nb_cores ' , inbij,' oce + ', inbi0(ji)*inbj0(ji) - inbij & 986 & , ' land ( ', inbi0(ji),' x ', inbj0(ji), & 987 & ' ), nb_points ', iszi0(ji)*iszj0(ji),' ( ', iszi0(ji),' x ', iszj0(ji),' )' 989 IF(lwp .AND. inbij < inbijold) THEN 990 WRITE(numout,'(a, i6, a, i6, a, f4.1, a, i9, a, i6, a, i6, a)') & 991 & 'nb_cores oce: ', inbij, ', land domains excluded: ', inbi0(ji)*inbj0(ji) - inbij, & 992 & ' (', REAL(inbi0(ji)*inbj0(ji) - inbij,wp) / REAL(inbi0(ji)*inbj0(ji),wp) *100., & 993 & '%), largest oce domain: ', iszi0(ji)*iszj0(ji), ' ( ', iszi0(ji),' x ', iszj0(ji), ' )' 994 inbijold = inbij 995 END IF 988 996 END DO 989 997 DEALLOCATE( inbi0, inbj0, iszi0, iszj0 ) 990 RETURN 998 IF(lwp) THEN 999 WRITE(numout,*) 1000 WRITE(numout,*) ' -----------------------------------------------------------' 1001 ENDIF 1002 CALL mppsync 1003 CALL mppstop( ld_abort = .TRUE. ) 991 1004 ENDIF 992 1005 -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/SBC/sbcmod.F90
r11348 r11413 316 316 ! 317 317 ! !* check consistency between model timeline and nn_fsbc 318 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR. & 319 MOD( nstock , nn_fsbc) /= 0 ) THEN 320 WRITE(ctmp1,*) 'sbc_init : experiment length (', nitend - nit000 + 1, ') or nstock (', nstock, & 321 & ' is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 322 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 318 IF( ln_rst_list .OR. nn_stock /= -1 ) THEN ! we will do restart files 319 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 ) THEN 320 WRITE(ctmp1,*) 'sbc_init : experiment length (', nitend - nit000 + 1, ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 321 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 322 ENDIF 323 IF( .NOT. ln_rst_list .AND. MOD( nn_stock, nn_fsbc) /= 0 ) THEN ! we don't use nn_stock if ln_rst_list 324 WRITE(ctmp1,*) 'sbc_init : nn_stock (', nn_stock, ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 325 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 326 ENDIF 323 327 ENDIF 324 328 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/STO/stopar.F90
r11348 r11413 270 270 IF(lwm) WRITE ( numond, namsto ) 271 271 272 IF( .NOT.ln_ rststo) THEN ! no use of stochastic parameterization272 IF( .NOT.ln_sto_eos ) THEN ! no use of stochastic parameterization 273 273 IF(lwp) THEN 274 274 WRITE(numout,*) … … 750 750 CHARACTER(LEN=9) :: clsto3d='sto3d_000' ! stochastic parameter variable name 751 751 CHARACTER(LEN=10) :: clseed='seed0_0000' ! seed variable name 752 752 !!---------------------------------------------------------------------- 753 754 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 755 753 756 IF ( jpsto2d > 0 .OR. jpsto3d > 0 ) THEN 754 757 … … 790 793 ! Open the restart file one timestep before writing restart 791 794 IF( kt < nitend) THEN 792 IF( kt == nitrst - 1 .OR. n stock == 1 .OR. kt == nitend-1 ) THEN795 IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. kt == nitend-1 ) THEN 793 796 ! create the filename 794 797 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/TRA/traqsr.F90
r11348 r11413 168 168 DO jj = 2, jpjm1 ! Separation in R-G-B depending of the surface Chl 169 169 DO ji = fs_2, fs_jpim1 170 zchl = sf_chl(1)%fnow(ji,jj,1)170 zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) 171 171 zCtot = 40.6 * zchl**0.459 172 172 zze = 568.2 * zCtot**(-0.746) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/TRD/trdmxl_rst.F90
r10425 r11413 47 47 !!-------------------------------------------------------------------------------- 48 48 49 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 50 49 51 ! to get better performances with NetCDF format: 50 52 ! we open and define the ocean restart_mxl file one time step before writing the data (-> at nitrst - 1) 51 53 ! except if we write ocean restart_mxl files every time step or if an ocean restart_mxl file was writen at nitend - 1 52 IF( kt == nitrst - 1 .OR. n stock == 1 .OR. ( kt == nitend .AND. MOD( nitend - 1, nstock ) == 0 ) ) THEN54 IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. MOD( nitend - 1, nn_stock ) == 0 ) ) THEN 53 55 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 54 56 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/TRD/trdvor.F90
r10425 r11413 46 46 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avr ! average 47 47 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrb ! before vorticity (kt-1) 48 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrbb ! vorticity at begining of the n write-1 timestep averaging period48 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrbb ! vorticity at begining of the nn_write-1 timestep averaging period 49 49 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrbn ! after vorticity at time step after the 50 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: rotot ! begining of the N WRITE-1 timesteps50 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: rotot ! begining of the NN_WRITE-1 timesteps 51 51 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrtot ! 52 52 REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) :: vor_avrres ! … … 129 129 !! from ocean surface down to control surface (NetCDF output) 130 130 !! 131 !! ** Method/usage : integration done over n write-1 time steps131 !! ** Method/usage : integration done over nn_write-1 time steps 132 132 !! 133 133 !! ** Action : trends : … … 143 143 !! vortrd (,,10) = forcing term 144 144 !! vortrd (,,11) = bottom friction term 145 !! rotot(,) : total cumulative trends over n write-1 time steps145 !! rotot(,) : total cumulative trends over nn_write-1 time steps 146 146 !! vor_avrtot(,) : first membre of vrticity equation 147 147 !! vor_avrres(,) : residual = dh/dt entrainment … … 214 214 !! from ocean surface down to control surface (NetCDF output) 215 215 !! 216 !! ** Method/usage : integration done over n write-1 time steps216 !! ** Method/usage : integration done over nn_write-1 time steps 217 217 !! 218 218 !! ** Action : trends : … … 228 228 !! vortrd (,,10) = forcing term 229 229 !! vortrd (,,11) = bottom friction term 230 !! rotot(,) : total cumulative trends over n write-1 time steps230 !! rotot(,) : total cumulative trends over nn_write-1 time steps 231 231 !! vor_avrtot(,) : first membre of vrticity equation 232 232 !! vor_avrres(,) : residual = dh/dt entrainment … … 360 360 ENDIF 361 361 362 ! II.2 cumulated trends over analysis period (kt=2 to n write)362 ! II.2 cumulated trends over analysis period (kt=2 to nn_write) 363 363 ! ---------------------- 364 ! trends cumulated over n write-2 time steps364 ! trends cumulated over nn_write-2 time steps 365 365 366 366 IF( kt >= nit000+2 ) THEN … … 376 376 ! III. Output in netCDF + residual computation 377 377 ! ============================================= 378 378 379 379 ! define time axis 380 380 it = kt … … 504 504 ENDIF 505 505 #if defined key_diainstant 506 zsto = n write*rdt506 zsto = nn_write*rdt 507 507 clop = "inst("//TRIM(clop)//")" 508 508 #else -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/USR/usrdef_nam.F90
r11348 r11413 63 63 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 64 64 ! 65 WRITE( numond, namusr_def )65 IF(lwm) WRITE( numond, namusr_def ) 66 66 ! 67 67 cd_cfg = 'GYRE' ! name & resolution (not used) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/ZDF/zdfiwm.F90
r11348 r11413 414 414 !! de Lavergne et al. in prep., 2017 415 415 !!---------------------------------------------------------------------- 416 INTEGER :: ji, jj, jk ! dummy loop indices417 416 INTEGER :: inum ! local integer 418 417 INTEGER :: ios -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/nemogcm.F90
r11348 r11413 59 59 USE diaobs ! Observation diagnostics (dia_obs_init routine) 60 60 USE diacfl ! CFL diagnostics (dia_cfl_init routine) 61 USE diaharm ! tidal harmonics diagnostics (dia_harm_init routine) 61 62 USE step ! NEMO time-stepping (stp routine) 62 63 USE icbini ! handle bergs, initialisation … … 129 130 !!---------------------------------------------------------------------- 130 131 INTEGER :: istp ! time step index 132 REAL(wp):: zstptiming ! elapsed time for 1 time step 131 133 !!---------------------------------------------------------------------- 132 134 ! … … 189 191 ! 190 192 DO WHILE( istp <= nitend .AND. nstop == 0 ) 191 #if defined key_mpp_mpi 193 192 194 ncom_stp = istp 193 IF ( istp == ( nit000 + 1 ) ) elapsed_time = MPI_Wtime() 194 IF ( istp == nitend ) elapsed_time = MPI_Wtime() - elapsed_time 195 #endif 195 IF( ln_timing ) THEN 196 zstptiming = MPI_Wtime() 197 IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming 198 IF ( istp == nitend ) elapsed_time = zstptiming - elapsed_time 199 ENDIF 200 196 201 CALL stp ( istp ) 197 202 istp = istp + 1 203 204 IF( lwp .AND. ln_timing ) WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming 205 198 206 END DO 199 207 ! … … 234 242 #else 235 243 IF ( lk_oasis ) THEN ; CALL cpl_finalize ! end coupling and mpp communications with OASIS 236 ELSEIF( lk_mpp ) THEN ; CALL mppstop ( ldfinal = .TRUE. )! end mpp communications244 ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications 237 245 ENDIF 238 246 #endif … … 469 477 470 478 ! ! Diagnostics 471 IF( lk_floats )CALL flo_init ! drifting Floats479 CALL flo_init ! drifting Floats 472 480 IF( ln_diacfl ) CALL dia_cfl_init ! Initialise CFL diagnostics 473 481 CALL dia_ptr_init ! Poleward TRansports initialization 474 IF( lk_diadct )CALL dia_dct_init ! Sections tranports482 CALL dia_dct_init ! Sections tranports 475 483 CALL dia_hsb_init ! heat content, salt content and volume budgets 476 484 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends … … 478 486 CALL dia_tmb_init ! TMB outputs 479 487 CALL dia_25h_init ! 25h mean outputs 480 IF( ln_diaobs ) CALL dia_obs( nit000-1 ) ! Observation operator for restart 488 CALL dia_harm_init ! tidal harmonics outputs 489 IF( ln_diaobs ) CALL dia_obs( nit000-1 ) ! Observation operator for restart 481 490 482 491 ! ! Assimilation increments … … 639 648 USE trc_oce , ONLY : trc_oce_alloc 640 649 USE bdy_oce , ONLY : bdy_oce_alloc 641 #if defined key_diadct642 USE diadct , ONLY : diadct_alloc643 #endif644 650 ! 645 651 INTEGER :: ierr … … 653 659 ierr = ierr + bdy_oce_alloc() ! bdy masks (incl. initialization) 654 660 ! 655 #if defined key_diadct656 ierr = ierr + diadct_alloc () !657 #endif658 !659 661 CALL mpp_sum( 'nemogcm', ierr ) 660 662 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' ) -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/step.F90
r11223 r11413 198 198 CALL div_hor ( kstp ) ! Horizontal divergence (2nd call in time-split case) 199 199 IF(.NOT.ln_linssh) CALL dom_vvl_sf_nxt( kstp, kcall=2 ) ! after vertical scale factors (update depth average component) 200 ENDIF 201 CALL dyn_zdf ( kstp ) ! vertical diffusion 202 203 IF( ln_dynspg_ts ) THEN 200 204 CALL wzv ( kstp ) ! now cross-level velocity 201 205 IF( ln_zad_Aimp ) CALL wAimp ( kstp ) ! Adaptive-implicit vertical advection partitioning 202 206 ENDIF 203 204 CALL dyn_zdf ( kstp ) ! vertical diffusion205 207 206 208 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 212 214 ! diagnostics and outputs 213 215 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 214 IF( l k_floats ) CALL flo_stp ( kstp ) ! drifting Floats216 IF( ln_floats ) CALL flo_stp ( kstp ) ! drifting Floats 215 217 IF( ln_diacfl ) CALL dia_cfl ( kstp ) ! Courant number diagnostics 216 218 IF( lk_diahth ) CALL dia_hth ( kstp ) ! Thermocline depth (20 degres isotherm depth) 217 IF( l k_diadct ) CALL dia_dct ( kstp ) ! Transports219 IF( ln_diadct ) CALL dia_dct ( kstp ) ! Transports 218 220 CALL dia_ar5 ( kstp ) ! ar5 diag 219 IF( l k_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis221 IF( ln_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis 220 222 CALL dia_wri ( kstp ) ! ocean model: outputs 221 223 ! -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/timing.F90
r10510 r11413 347 347 348 348 ! write output file 349 IF( lwriter ) WRITE(numtime,*) 350 IF( lwriter ) WRITE(numtime,*) 349 351 IF( lwriter ) WRITE(numtime,*) 'Total timing (sum) :' 350 352 IF( lwriter ) WRITE(numtime,*) '--------------------' … … 657 659 ! Compute cpu/elapsed ratio 658 660 zall_ratio(:) = all_ctime(:) / all_etime(:) 659 ztot_ratio = SUM( zall_ratio(:))660 zavg_ratio = ztot_ratio/REAL(jpnij,wp)661 ztot_ratio = SUM(all_ctime(:))/SUM(all_etime(:)) 662 zavg_ratio = SUM(zall_ratio(:))/REAL(jpnij,wp) 661 663 zmax_ratio = MAXVAL(zall_ratio(:)) 662 664 zmin_ratio = MINVAL(zall_ratio(:)) … … 667 669 cllignes(2)='1x,"--------------------",//,' 668 670 cllignes(3)='1x,"Process Rank |"," Elapsed Time (s) |"," CPU Time (s) |"," Ratio CPU/Elapsed",/,' 669 cllignes(4)=' (1x,i4,9x,"|",f12.3,6x,"|",f12.3,2x,"|",4x,f7.3,/),'670 WRITE(cllignes(4)(1: 4),'(I4)') jpnij671 cllignes(4)=' (4x,i6,4x,"|",f12.3,6x,"|",f12.3,2x,"|",4x,f7.3,/),' 672 WRITE(cllignes(4)(1:6),'(I6)') jpnij 671 673 cllignes(5)='1x,"Total |",f12.3,6x,"|",F12.3,2x,"|",4x,f7.3,/,' 672 674 cllignes(6)='1x,"Minimum |",f12.3,6x,"|",F12.3,2x,"|",4x,f7.3,/,' -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/SAS/diawri.F90
r11357 r11413 137 137 !! define all the NETCDF files and fields 138 138 !! At each time step call histdef to compute the mean if ncessary 139 !! Each n write time step, output the instantaneous or mean fields139 !! Each nn_write time step, output the instantaneous or mean fields 140 140 !!---------------------------------------------------------------------- 141 141 !! … … 152 152 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 153 153 !!---------------------------------------------------------------------- 154 !155 IF( ln_timing ) CALL timing_start('dia_wri')156 154 ! 157 155 ! Output the initial state and forcings … … 161 159 ENDIF 162 160 ! 161 IF( nn_write == -1 ) RETURN ! we will never do any output 162 ! 163 IF( ln_timing ) CALL timing_start('dia_wri') 164 ! 163 165 ! 0. Initialisation 164 166 ! ----------------- … … 173 175 ENDIF 174 176 #if defined key_diainstant 175 zsto = n write * rdt177 zsto = nn_write * rdt 176 178 clop = "inst("//TRIM(clop)//")" 177 179 #else … … 179 181 clop = "ave("//TRIM(clop)//")" 180 182 #endif 181 zout = n write * rdt183 zout = nn_write * rdt 182 184 zmax = ( nitend - nit000 + 1 ) * rdt 183 185 … … 211 213 ! WRITE root name in date.file for use by postpro 212 214 IF(lwp) THEN 213 CALL dia_nam( clhstnam, n write,' ' )215 CALL dia_nam( clhstnam, nn_write,' ' ) 214 216 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 215 217 WRITE(inum,*) clhstnam … … 219 221 ! Define the T grid FILE ( nid_T ) 220 222 221 CALL dia_nam( clhstnam, n write, 'grid_T' )223 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 222 224 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 223 225 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 231 233 ! Define the U grid FILE ( nid_U ) 232 234 233 CALL dia_nam( clhstnam, n write, 'grid_U' )235 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 234 236 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 235 237 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 243 245 ! Define the V grid FILE ( nid_V ) 244 246 245 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename247 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 246 248 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 247 249 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 349 351 ! donne le nombre d'elements, et ndex la liste des indices a sortir 350 352 351 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN353 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 352 354 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 353 355 WRITE(numout,*) '~~~~~~ ' -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/SAS/nemogcm.F90
r11348 r11413 164 164 #else 165 165 IF ( lk_oasis ) THEN ; CALL cpl_finalize ! end coupling and mpp communications with OASIS 166 ELSEIF( lk_mpp ) THEN ; CALL mppstop ( ldfinal = .TRUE. )! end mpp communications166 ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications 167 167 ENDIF 168 168 #endif -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/TOP/PISCES/SED/sedrst.F90
r10425 r11413 49 49 IF( ln_rst_list ) THEN 50 50 nrst_lst = 1 51 nitrst = n stocklist( nrst_lst )51 nitrst = nn_stocklist( nrst_lst ) 52 52 ELSE 53 53 nitrst = nitend 54 54 ENDIF 55 55 ENDIF 56 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, n stock ) == 0 ) THEN56 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 57 57 ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 58 nitrst = kt + n stock - 1 ! define the next value of nitrst for restart writing58 nitrst = kt + nn_stock - 1 ! define the next value of nitrst for restart writing 59 59 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 60 60 ENDIF … … 62 62 IF( kt == nittrc000 ) lrst_sed = .FALSE. 63 63 ENDIF 64 65 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 64 66 65 67 ! to get better performances with NetCDF format: 66 68 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 67 69 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 68 IF( kt == nitrst - 2*nn_dtsed .OR. n stock == nn_dtsed .OR. ( kt == nitend - nn_dtsed .AND. .NOT. lrst_sed ) ) THEN70 IF( kt == nitrst - 2*nn_dtsed .OR. nn_stock == nn_dtsed .OR. ( kt == nitend - nn_dtsed .AND. .NOT. lrst_sed ) ) THEN 69 71 ! beware of the format used to write kt (default is i8.8, that should be large enough) 70 72 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst … … 300 302 IF( l_offline .AND. ln_rst_list ) THEN 301 303 nrst_lst = nrst_lst + 1 302 nitrst = n stocklist( nrst_lst )304 nitrst = nn_stocklist( nrst_lst ) 303 305 ENDIF 304 306 ENDIF -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/TOP/TRP/trcsink.F90
r11348 r11413 87 87 DO jj = 1, jpj 88 88 DO ji = 1, jpi 89 IF( tmask(ji,jj,jk) == 1 ) THEN89 IF( tmask(ji,jj,jk) == 1.0 ) THEN 90 90 zwsmax = 0.5 * e3t_n(ji,jj,jk) * rday / rsfact 91 91 zwsink(ji,jj,jk) = MIN( pwsink(ji,jj,jk), zwsmax * REAL( iiter(ji,jj), wp ) ) 92 ELSE 93 ! provide a default value so there is no use of undefinite value in trc_sink2 for zwsink2 initialization 94 zwsink(ji,jj,jk) = 0. 92 95 ENDIF 93 96 END DO -
NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/TOP/trcrst.F90
r10425 r11413 58 58 IF( ln_rst_list ) THEN 59 59 nrst_lst = 1 60 nitrst = n stocklist( nrst_lst )60 nitrst = nn_stocklist( nrst_lst ) 61 61 ELSE 62 62 nitrst = nitend … … 64 64 ENDIF 65 65 66 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, n stock ) == 0 ) THEN66 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 67 67 ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment 68 nitrst = kt + n stock - 1 ! define the next value of nitrst for restart writing68 nitrst = kt + nn_stock - 1 ! define the next value of nitrst for restart writing 69 69 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 70 70 ENDIF … … 72 72 IF( kt == nittrc000 ) lrst_trc = .FALSE. 73 73 ENDIF 74 75 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 74 76 75 77 ! to get better performances with NetCDF format: 76 78 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 77 79 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 78 IF( kt == nitrst - 2*nn_dttrc .OR. n stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN80 IF( kt == nitrst - 2*nn_dttrc .OR. nn_stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 79 81 ! beware of the format used to write kt (default is i8.8, that should be large enough) 80 82 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst … … 153 155 IF( l_offline .AND. ln_rst_list ) THEN 154 156 nrst_lst = nrst_lst + 1 155 nitrst = n stocklist( nrst_lst )157 nitrst = nn_stocklist( nrst_lst ) 156 158 ENDIF 157 159 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.