Changeset 3092
- Timestamp:
- Oct 18, 2023, 3:35:24 PM (13 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3078 r3092 4257 4257 is correctly handled (i.e. on lon-lat grid outputs polar mesh area must 4258 4258 be adjusted to account for the replicated polar meshes). 4259 4259 4260 == 10/10/2023 == EM+JBC 4261 Follow-up of r3078 which broke the 1D model. 4262 Also added initialisation of non-oro GW tendencies stored in startfi.nc when in 1D. 4263 4264 == 18/10/2023 == JBC 4265 - Correction of a bug in "writediagfi.F": the case of using the 1D model with parallelization was not anticipated so that the "diagfi.nc" file was filled with NaNf; 4266 - Addition of the file "start1D.txt" as an example in the directory deftank/; 4267 - Some "cosmetic" modifications in "improvedclouds_mod.F", "write_output_mod.F90" and "testphys1d.F90". -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3074 r3092 34 34 ! and a file describing the sigma layers (e.g. "z2sig.def") 35 35 ! 36 ! author: Frederic Hourdin, R. Fournier,F.Forget36 ! author: Frederic Hourdin, R. Fournier, F. Forget 37 37 ! ------- 38 38 ! … … 90 90 real, dimension(1) :: latitude, longitude, cell_area 91 91 logical :: there 92 character( len = 2):: str293 character( len = 7):: str794 character( len = 44):: txt92 character(2) :: str2 93 character(7) :: str7 94 character(44) :: txt 95 95 96 96 ! RV & JBC: Use of starting files for 1D -
trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F
r3075 r3092 613 613 print*, 'count is ',countcells, ' i.e. ', 614 614 & countcells*100/(nlay*ngrid), '% for microphys computation' 615 616 #ifndef MESOSCALE617 ! IF (ngrid.ne.1) THEN ! 3D618 ! call WRITEDIAGFI(ngrid,"satu","ratio saturation","",3,619 ! & satu_out)620 ! call WRITEDIAGFI(ngrid,"dM","ccn variation","kg/kg",3,621 ! & dM_out)622 ! call WRITEDIAGFI(ngrid,"dN","ccn variation","#",3,623 ! & dN_out)624 ! call WRITEDIAGFI(ngrid,"error","dichotomy max error","%",2,625 ! & error2d)626 ! call WRITEDIAGFI(ngrid,"zqsat","zqsat","kg",3,627 ! & zqsat)628 ! ENDIF629 630 ! IF (ngrid.eq.1) THEN ! 1D631 ! call WRITEDIAGFI(ngrid,"error","incertitude sur glace","%",1,632 ! & error_out)633 call WRITEdiagfi(ngrid,"resist","resistance","s/m2",1,634 & res_out)635 call WRITEdiagfi(ngrid,"satu_bf","satu before","kg/kg",1,636 & satubf)637 call WRITEdiagfi(ngrid,"satu_af","satu after","kg/kg",1,638 & satuaf)639 call WRITEdiagfi(ngrid,"vapbf","h2ovap before","kg/kg",1,640 & zq0(1,1,igcm_h2o_vap))641 call WRITEdiagfi(ngrid,"vapaf","h2ovap after","kg/kg",1,642 & zq(1,1,igcm_h2o_vap))643 call WRITEdiagfi(ngrid,"icebf","h2oice before","kg/kg",1,644 & zq0(1,1,igcm_h2o_ice))645 call WRITEdiagfi(ngrid,"iceaf","h2oice after","kg/kg",1,646 & zq(1,1,igcm_h2o_ice))647 call WRITEdiagfi(ngrid,"ccnbf","ccn before","/kg",1,648 & zq0(1,1,igcm_ccn_number))649 call WRITEdiagfi(ngrid,"ccnaf","ccn after","/kg",1,650 & zq(1,1,igcm_ccn_number))651 c call WRITEDIAGFI(ngrid,"growthrate","growth rate","m^2/s",1,652 c & gr_out)653 c call WRITEDIAGFI(ngrid,"nuclearate","nucleation rate","",1,654 c & rate_out)655 c call WRITEDIAGFI(ngrid,"dM","ccn variation","kg",1,656 c & dM_out)657 c call WRITEDIAGFI(ngrid,"dN","ccn variation","#",1,658 c & dN_out)659 call WRITEdiagfi(ngrid,"zqsat","p vap sat","kg/kg",1,660 & zqsat)661 ! call WRITEDIAGFI(ngrid,"satu","ratio saturation","",1,662 ! & satu_out)663 call WRITEdiagfi(ngrid,"rice","ice radius","m",1,664 & rice)665 ! call WRITEDIAGFI(ngrid,"rdust_sca","rdust","m",1,666 ! & rdust)667 ! call WRITEDIAGFI(ngrid,"rsedcloud","rsedcloud","m",1,668 ! & rsedcloud)669 ! call WRITEDIAGFI(ngrid,"rhocloud","rhocloud","kg.m-3",1,670 ! & rhocloud)671 ! ENDIF672 #endif673 615 674 616 ENDIF ! endif test_flag -
trunk/LMDZ.MARS/libf/phymars/write_output_mod.F90
r3055 r3092 1 1 MODULE write_output_mod 2 IMPLICIT NONE 2 3 IMPLICIT NONE 4 3 5 PRIVATE 4 5 6 MODULE PROCEDURE write_output_d0,write_output_d1,write_output_d2, &7 write_output_i0,write_output_i1,write_output_i2, &8 write_output_l0,write_output_l1,write_output_l29 10 END INTERFACE write_output 11 12 PUBLIC write_output 13 6 7 INTERFACE write_output 8 MODULE PROCEDURE write_output_d0, write_output_d1, write_output_d2, & 9 write_output_i0, write_output_i1, write_output_i2, & 10 write_output_l0, write_output_l1, write_output_l2 11 END INTERFACE write_output 12 13 PUBLIC write_output 14 15 !---------------------------------------------------------------------- 14 16 CONTAINS 17 !---------------------------------------------------------------------- 15 18 16 19 SUBROUTINE write_output_d0(field_name,title,units,field) … … 28 31 CHARACTER(LEN=*),INTENT(IN) :: units 29 32 REAL,INTENT(IN) :: field 30 33 31 34 call writediagfi(ngrid,field_name,title,units,0,field) 32 #ifdef CPP_XIOS 35 #ifdef CPP_XIOS 33 36 if (xios_is_active_field(field_name)) then 34 37 ! only send the field to xios if the user asked for it … … 36 39 endif 37 40 #endif 38 41 39 42 END SUBROUTINE write_output_d0 40 43 44 !---------------------------------------------------------------------- 45 41 46 SUBROUTINE write_output_d1(field_name,title,units,field) 42 47 ! For a surface field … … 53 58 CHARACTER(LEN=*),INTENT(IN) :: units 54 59 REAL,INTENT(IN) :: field(:) 55 60 56 61 call writediagfi(ngrid,field_name,title,units,2,field) 57 #ifdef CPP_XIOS 62 #ifdef CPP_XIOS 58 63 if (xios_is_active_field(field_name)) then 59 64 ! only send the field to xios if the user asked for it … … 61 66 endif 62 67 #endif 63 68 64 69 END SUBROUTINE write_output_d1 70 71 !---------------------------------------------------------------------- 65 72 66 73 SUBROUTINE write_output_d2(field_name,title,units,field) … … 83 90 if(size(field(:,:),2).eq.nsoilmx) then 84 91 call writediagsoil(ngrid,field_name,title,units,3,field) 85 else 92 else 86 93 call writediagfi(ngrid,field_name,title,units,3,field(:,:)) 87 94 endif 88 #ifdef CPP_XIOS 95 #ifdef CPP_XIOS 89 96 if (xios_is_active_field(field_name)) then 90 97 ! only send the field to xios if the user asked for it … … 92 99 endif 93 100 #endif 94 101 95 102 END SUBROUTINE write_output_d2 96 103 104 !---------------------------------------------------------------------- 105 97 106 SUBROUTINE write_output_i0(field_name,title,units,field) 98 107 ! For a surface field … … 109 118 CHARACTER(LEN=*),INTENT(IN) :: units 110 119 INTEGER,INTENT(IN) :: field 111 120 112 121 call writediagfi(ngrid,field_name,title,units,0,real(field)) 113 #ifdef CPP_XIOS 122 #ifdef CPP_XIOS 114 123 if (xios_is_active_field(field_name)) then 115 124 ! only send the field to xios if the user asked for it … … 117 126 endif 118 127 #endif 119 128 120 129 END SUBROUTINE write_output_i0 121 130 131 !---------------------------------------------------------------------- 132 122 133 SUBROUTINE write_output_i1(field_name,title,units,field) 123 134 ! For a surface field … … 134 145 CHARACTER(LEN=*),INTENT(IN) :: units 135 146 INTEGER,INTENT(IN) :: field(:) 136 147 137 148 call writediagfi(ngrid,field_name,title,units,2,real(field)) 138 #ifdef CPP_XIOS 149 #ifdef CPP_XIOS 139 150 if (xios_is_active_field(field_name)) then 140 151 ! only send the field to xios if the user asked for it … … 142 153 endif 143 154 #endif 144 155 145 156 END SUBROUTINE write_output_i1 157 158 !---------------------------------------------------------------------- 146 159 147 160 SUBROUTINE write_output_i2(field_name,title,units,field) … … 164 177 if(size(field(:,:),2).eq.nsoilmx) then 165 178 call writediagsoil(ngrid,field_name,title,units,3,real(field)) 166 else 179 else 167 180 call writediagfi(ngrid,field_name,title,units,3,real(field(:,:))) 168 181 endif 169 #ifdef CPP_XIOS 182 #ifdef CPP_XIOS 170 183 if (xios_is_active_field(field_name)) then 171 184 ! only send the field to xios if the user asked for it … … 173 186 endif 174 187 #endif 175 188 176 189 END SUBROUTINE write_output_i2 190 191 !---------------------------------------------------------------------- 177 192 178 193 SUBROUTINE write_output_l0(field_name,title,units,field) … … 195 210 field_real=0 196 211 if(field) field_real=1 197 212 198 213 call writediagfi(ngrid,field_name,title,units,0,field_real) 199 #ifdef CPP_XIOS 214 #ifdef CPP_XIOS 200 215 if (xios_is_active_field(field_name)) then 201 216 ! only send the field to xios if the user asked for it … … 203 218 endif 204 219 #endif 205 220 206 221 END SUBROUTINE write_output_l0 222 223 !---------------------------------------------------------------------- 207 224 208 225 SUBROUTINE write_output_l1(field_name,title,units,field) … … 228 245 if(field(i)) field_real(i)=1. 229 246 ENDDO 230 247 231 248 call writediagfi(ngrid,field_name,title,units,2,field_real(:)) 232 #ifdef CPP_XIOS 249 #ifdef CPP_XIOS 233 250 if (xios_is_active_field(field_name)) then 234 251 ! only send the field to xios if the user asked for it … … 236 253 endif 237 254 #endif 238 255 239 256 END SUBROUTINE write_output_l1 257 258 !---------------------------------------------------------------------- 240 259 241 260 SUBROUTINE write_output_l2(field_name,title,units,field) … … 270 289 if(size(field(:,:),2).eq.nsoilmx) then 271 290 call writediagsoil(ngrid,field_name,title,units,3,field_real) 272 else 291 else 273 292 call writediagfi(ngrid,field_name,title,units,3,field_real(:,:)) 274 293 endif 275 294 276 #ifdef CPP_XIOS 295 #ifdef CPP_XIOS 277 296 if (xios_is_active_field(field_name)) then 278 297 ! only send the field to xios if the user asked for it … … 280 299 endif 281 300 #endif 282 301 283 302 deallocate(field_real) 284 303 -
trunk/LMDZ.MARS/libf/phymars/writediagfi.F
r2900 r3092 312 312 if (dim.eq.3) then 313 313 314 IF (klon_glo>1) THEN ! General case 314 315 #ifdef CPP_PARA 315 316 ! Gather field on a "global" (without redundant longitude) array … … 327 328 ! Passage variable physique --> variable dynamique 328 329 ! recast (copy) variable from physics grid to dynamics grid 329 IF (klon_glo>1) THEN ! General case330 330 DO l=1,nbp_lev 331 331 DO i=1,nbp_lon+1 … … 341 341 ENDDO 342 342 ENDDO 343 #endif 343 344 ELSE ! 1D model case 344 345 dx3_1d(1,1:nbp_lev)=px(1,1:nbp_lev) 345 346 ENDIF 346 #endif347 347 ! Ecriture du champs 348 348 … … 416 416 else if (dim.eq.2) then 417 417 418 IF (klon_glo>1) THEN ! General case 418 419 #ifdef CPP_PARA 419 420 ! Gather field on a "global" (without redundant longitude) array … … 433 434 ! Passage variable physique --> physique dynamique 434 435 ! recast (copy) variable from physics grid to dynamics grid 435 IF (klon_glo>1) THEN ! General case436 436 DO i=1,nbp_lon+1 437 437 dx2(i,1)=px(1,1) … … 445 445 dx2(nbp_lon+1,j)=dx2(1,j) 446 446 ENDDO 447 #endif 447 448 ELSE ! 1D model case 448 449 dx2_1d=px(1,1) 449 450 ENDIF 450 #endif451 451 452 452 if (is_master) then
Note: See TracChangeset
for help on using the changeset viewer.