mom4_Aeolus_lad_96x60 ============================= MOM4/5 with land_lad and Aeolus at same resolution as CM2M_coarse_BLING. This is an attempt to couple Aelous with MOM4 and land_lad. It is derived from CM2M_coarse_BLING , but with the atmosphere component replaced with Aeolus. In contrast to the mom4_Aeolus_lad_Xcoarse setup, here the ocean setup is taken identical from the CM2M_coarse_BLING. Model resolution: here om3Xcoarse CM2M_coarse_BLING om3_core Ocean 120x80x23 120x80x23 120x80x23 360x200x50 Land 96x60 144x90 96x60 144x90 Atmos 96x60 144x90 96x60 144x90 Supergrid resolutions: Ocean: 240x160 240x160 240x160 720x400 Land: 192x120 288x180 192x120 288x180 Atmos: 192x120 288x180 192x120 288x180 mkdir exp/mom4_Aeolus_lad_Xcoarse_96x60/INPUT cd exp/mom4_Aeolus_lad_Xcoarse_96x60/INPUT # first symlink all INPUT files from CM2M_coarse_BLING, # just to make easily sure that we get as much matching as possible. ln -s ../../../exp/CM2M_coarse_BLING/INPUT/* . # this also symlinks many things that we definitly wont need here. # clean up some of that. rm -f cns_* \ h2o* \ *_gblannualdata \ esf_sw_input_data* \ README_atmos2004 \ aerosol.climatology.nc \ aerosol.optical.dat \ asmsw_data.nc \ eftsw4str \ emissions.ch3i.GEOS4x5.nc \ extlw_data.nc \ extsw_data.nc \ o3.climatology.nc \ o39001200_hi00_data \ o39001200_hi92_data \ lean_solar_spectral_data.dat \ id1* \ id2* # make a solid copy of the configuration files rm *table input.nml cp -p ../../CM2M_coarse_BLING/INPUT/*table \ ../../CM2M_coarse_BLING/INPUT/input.nml \ . # # begin of grid generation # Sigh deeply. CM2M_coarse_BLING/INPUT/atmos_hgrid.nc specifies latitudes non-uniformly. It has 60 latitudinal rows, almost evenly distributed, but not totally. At the poles, there is one narrow row. Thus, widths and centers of the lat rows are: 1.525 -89.24 3.051 -86.95 3.051 -83.90 3.051 -80.85 3.051 -77.80 ... ... This is not yet possible with Aeolus SphericalGrid. Thus we need to generate a suitable grid for Aeolus. # the make_coupler_mosaic tool requires a dimension named ntiles # but this not contained in the GFDL-provided topog.nc files # sigh. the name topog.nc is hardcoded in the ocean topography module rm topog.nc ncap2 -o topog.nc -s 'defdim("ntiles",1)' ../../../exp/CM2M_coarse_BLING/INPUT/topog.nc rm -f atmos_hgrid.nc \ atmos_mosaic.nc \ *mosaic*X* \ grid_spec.nc \ ocean_mask.nc \ land_mask.nc ../../../src/tools/make_hgrid/make_hgrid --grid_type regular_lonlat_grid --nxbnd 2 --nybnd 2 --xbnds 0\,360 --ybnds -90\,90 \ --simple_dx 3.75 --simple_dy 3.0 \ --nlon 192 --nlat 120 \ --grid_name aeolus_hgrid ../../../src/tools/make_solo_mosaic/make_solo_mosaic --dir . --num_tiles 1 \ --tile_file aeolus_hgrid.nc --mosaic_name aeolus_mosaic ../../../src/tools/make_coupler_mosaic/make_coupler_mosaic \ --atmos_mosaic aeolus_mosaic.nc \ --ocean_mosaic ocean_mosaic.nc \ --ocean_topog topog.nc \ --land_mosaic land_mosaic.nc \ --mosaic_name grid_spec \ --check # # For the land_lad model # > CM2M_coarse_BLING CM2.1p1 EBM ICCMp1 > horizontal grid cells 96x60 144x90 144x90 144x90 > resolution in degrees 3.75x3.0 2.5x2.0 2.5x2.0 2.5x2.0 > > soil/soil.F90 > soil.res.nc (if exists) - 144x90 - - > soil.res (if exists) - - - - > > > soil/land_properties.F90 > cover_type_field 360x180 360x180 360x180 360x180 (only EBM and ICCMp1 identical) > cover_type_field.nc 360x180 360x180 360x180 360x180 (all identical) > ground_type_field 360x180 360x180 360x180 360x180 (all identical) > groundwater_residence_time_field 360x180 360x180 360x180 360x180 (all identical) > > > soil/rivers.F90 > river_destination_field 96x80 96x80 96x80 96x60 (all different!) > > vegetation/vegetation.F90 > vegetation.res.nc (if exists) - 144x90 - - > vegetation.res (if exists) - - - - > > land_param/climap_albedo.F90 > albedo.data.nc 180x90 180x90 180x90 180x90 > albedo.data - - - - > ss_albedo.data (optional) - - - - > > topography/topography.F90 > navy_topography.data.nc 2160x1080 2160x1080 2160x1080 2160x1080 (all identical) > > not used anywhere?? - might be diagnostic output files? > soil_albedo.nc 360x180 - - - > groundwater_residence.nc 360x180 - - - > ground_type.nc 360x180 - - - ## data_table # Check whether the ATM entries are used in the coupler, or in the CM2 code. # If only in the CM2 code, they can be removed from data_table. # However, if not, it should not harm. # Leave intact the constant setting for ``normal'' CO2 "ATM" , "co2_bot" , "" , "" , .false. , 286.0e-6 # apparently this forces a globally and temporal constant CO2 concentration # However, this used inside the CM2 atmosphere code, and not used in Aeolus. # TODO: check if it this used in the coupler code. ## field table for now, leave it as is. ## diag_table # for first experiments, use a table that puts out all the fields that go through coupler as instant values, # not aggregated by averaging or anything. ## input.nml # strip out all entries for the CM2 atmosphere # insert entries for Aeolus # # for Aeolus # Usually, Aeolus uses longitudes runnning -180 to 180 in its data files. However, the FMS atmosphere grid runs 0 to 360 degrees. To make Aeolus use those 0 to 360 degrees, the flag lon_0_360 must be set to true in the namelist parameters. The script rotate_0to360.sh uses ferret to do the axis rotation. However, the initial conditions that are derived from CM2M_coarse_BLING restart files are already on 0-to-360. Also, since r2481 (Mon, 02 Sep 2013), Aeolus uses the FMS topography and does not need a topography of its own. ## ## Initial Conditions ## The CM2M_coarse_BLING setup provides restart files for the ocean and ice, but land and atmosphere do cold-start from artificial initial conditions. However, Aeolus currently is not designed to handle large differences between planet surface and lowest atmosphere layer. First approach: * Let the CM2M_coarse_BLING run from the provided restart / initial conditions for 50 years. * Among the generated RESTART files is atmos_coupled.res.nc , which is saved by the generic atmos_coupled/atmos_model.F90 . For Aeolus, we are mainly interested in t_bot and sphum. Per default, those two are not written by atmos_model.F90, but can be enabled by setting restart_tbot_qbot = .true. in atmos_model_nml . * That atmos_coupled.res.nc is already on the correct grid for this setup here. * t_bot and sphum must be extracted to a file named AEOLUS_input_1976-2001_yseasmean.cdf, variables T500mb (PlanetaryBoundaryLayerPhysics::LoadFromFile) => Question: in PlanetaryBoundaryLayerPhysics::LoadFromFile() the read-in temperatures are added with 5000. * 6.e-3 ?? QS (WaterVaporTransfer::LoadFromFile) cp -p 00520101.RESTART.tar.bz2 \ CM2M_coarse_BLING-00520101.RESTART.tar.bz2 tar xvjf CM2M_coarse_BLING-00520101.RESTART.tar.bz2 # Sigh. The atmos_coupled module wants to read variables glon_bnd, glat_bnd, dt from atmos_coupled.res.nc, # but the fregrid tool does not handle those. # Thus we copy those variables from the original file. # NOTE: also the length of the atmos time step is contained in the atmos_coupled.res.nc . # Time = 1 ; # glon_bnd = 96 ; # glat_bnd = 60 ; # dt = 5400 ; rm -f atmos_coupled.res.nc ../../../src/tools/fregrid/fregrid \ --input_mosaic ../../CM2M_coarse_BLING/INPUT/atmos_mosaic.nc \ --output_mosaic ./aeolus_mosaic.nc \ --input_file 00520101.RESTART/atmos_coupled.res.nc \ --output_file atmos_coupled.res.nc \ --scalar_field lprec\,fprec\,gust\,t_bot\,q_bot ncks -A -v glon_bnd\,glat_bnd\,dt 00520101.RESTART/atmos_coupled.res.nc atmos_coupled.res.nc # Now we can create an Aeolus initial conditions file. ncrename -v q_bot\,QS -v t_bot\,TS atmos_coupled.res.nc AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart # maybe we can use ncap2 to do renaming and type conversion in one go. ncatted -a units\,TS\,o\,c\,K AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart #ncatted -a units\,QS\,o\,c\,"" AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart # sigh. this dumps core. easiest workaround seems to do it in the ncdump-edit-ncgen step #ncatted -a units\,QS\,o\,c\,"1" AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart ncatted -a units\,QS\,d\,c\,"" AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart ln -s AEOLUS_input_1976-2001_yseasmean.cdf-fromCM2Mrestart AEOLUS_input_1976-2001_yseasmean.cdf # CM2M_coarse_BLING also writes out atmos_tracers.res.nc, containing values for # sphum, liq_wat, ice_wat, cld_amt. # However, it seems that those are not used when coupling with Aeolus ??? # Mmhh, EBM does not care for tracers. Maybe we also do not need to do that? # For now, do it anyway: #cp -p 00520101.RESTART/atmos_tracers.res.nc . # fregrid complains that it cannot determine the axis for dimensions pfull, lat, lon. # Thus, add apropriate attributes: rm -f atmos_tracers.res.nc ncatted -a cartesian_axis\,pfull\,c\,c\,"Z" \ -a cartesian_axis\,lat\,c\,c\,"Y" \ -a cartesian_axis\,lon\,c\,c\,"X" \ 00520101.RESTART/atmos_tracers.res.nc ../../../src/tools/fregrid/fregrid \ --input_mosaic ../../CM2M_coarse_BLING/INPUT/atmos_mosaic.nc \ --output_mosaic ./aeolus_mosaic.nc \ --input_file 00520101.RESTART/atmos_tracers.res.nc \ --output_file atmos_tracers.res.nc \ --scalar_field sphum\,liq_wat\,ice_wat\,cld_amt # copy restart data for coupler, ocean, ice and land to INPUT directory so that all # submodels can start with data from consistent time steps. ( cd 00520101.RESTART ; \ for i in coupler.res \ ocean_* \ ice_* \ soil.res.nc \ vegetation.res.nc ; \ do rm -f ../$i ; \ cp -p $i ../. ; \ done \ ) ==== Stock checking: Stock diagnostics are sent to the diag manager if input.nml/coupler_nml/check_stocks=1 (every time step) For each of the component models XXX = { ATM LND ICE OCN }, and stock elements yyy = { water heat salt }, 3 diagnostics can be sent: XXXyyyStocksChange_Flux XXXyyyStocksChange_Comp XXXyyyStocksChange_Diff Also, stock reports are printed to stdout , or into a separate stocks.out file: Total =S(t) not sent to diag manager Change=S(t)-S(0) equal to XXXyyyStocksChange_Comp Input =F(t) equal to XXXyyyStocksChange_Flux Diff =F(t) - (S(t)-S(0)) equal to XXXyyyStocksChange_Diff Error =Diff/S(0) parameter :: NELEMS=3 character, dimension(NELEMS) :: STOCK_NAMES=(/'water', 'heat ', 'salt '/) parameter :: NSIDES = 3 ! top, bottom, side type stock_type real :: q_start = 0.0 ! total stocks at start time real :: q_now = 0.0 ! total stocks at time t ! The dq's below are the stocks increments at the present time ! delta_t * surf integr of flux ! one for each side (ISTOCK_TOP, ISTOCK_BOTTOM, ISTOCK_SIDE) real :: dq(NSIDES) = 0.0 ! stock increments at present time on the Ice grid real :: dq_IN(NSIDES) = 0.0 ! stock increments at present time on the Ocean grid end type stock_type type(stock_type), dimension(NELEMS) :: Atm_stock, Ocn_stock, Lnd_stock, Ice_stock parameter :: NCOMPS=4 character, dimension(NCOMPS) :: COMP_NAMES=(/'ATM', 'LND', 'ICE', 'OCN'/) StocksChange_Flux f_value == Input: StocksChange_Comp c_value == Change: StocksChange_Diff fmc_value == Diff: Total: == Input: + Input(0) Total : q_now Change: q_now - q_start Input: f_value Diff : f_value - c_value Error: (f_value - c_value)/(1+q_start) comp = ISTOCK_ATM ISTOCK_LND ISTOCK_ICE ISTOCK_OCN f_ice_grid(comp) = sum(stck%dq) f_ocn_grid(comp) = sum(stck%dq_IN) f_ocn_btf(comp) = stck%dq_IN( ISTOCK_BOTTOM ) q_start(comp) = stck%q_start q_now(comp) = stck%q_now c_value(comp) = q_now(comp) - q_start(comp) == f_value(comp) = f_ice_grid(comp) resp. f_ocn_grid(comp) fmc_value = f_value(comp)-c_value(comp) ---------- Aeolus always sets frozen precipitation to 0; our restart conditions contain fprec != 0; Apparently, that could be one cause for the strong erratic behaviour at start of the coupled Aeolus model. Try: set fprec to 0 in the restart conditions. mv atmos_coupled.res.nc atmos_coupled.res.nc-orig-with-fprec ncap2 -O -c -s 'fprec=fprec;fprec=0;' atmos_coupled.res.nc-orig-with-fprec atmos_coupled.res.nc-fprec-0 ln -s atmos_coupled.res.nc-fprec-0 atmos_coupled.res.nc ------ It turns out that frozen precipitation is needed by the coupler to maintain energy stocks, because latent heat of fusion depends on fprec. Thus, we have now implemented frozen precipitation in Aeolus, and do not need to set it to 0 zero any more in the initial coniditions.