sdat2 / seager19

Replication of Seager et al. (2019) Nat. Clim. Chan. They used a simple-as-possible coupled model to explain the bias in the nino3.4 trend in climate models (CMIP5). This repository replicates/reproduces their work, shows that it also applies to CMIP6, and varies some of the parameters.
https://seager19.readthedocs.io/
MIT License
6 stars 0 forks source link

Couple Ocean to Atmos & Test for closeness to Seager et al. Fig. #13

Closed sdat2 closed 3 years ago

sdat2 commented 3 years ago

Need to couple the model together using the (slightly scant) hints in the paper's appendix.

sdat2 commented 3 years ago
sdat2 commented 3 years ago

It might make sense for the ocean and atmospheric models to be called from the coupled model object.

sdat2 commented 3 years ago

setup.atmos_data_path

['clt-ECMWF-clim60.nc', 'mask-360x180.nc', 'mask-360x181.nc', 'pr-ECMWF-clim.nc', 'pr-ECMWF-trend.nc', 'ps-ECMWF-clim.nc', 'rh-ECMWF-clim60.nc', 'rh-fixed-clim60.nc', 'sfcWind-ECMWF-clim60.nc', 'sfcWind-ECMWF-clim.nc', 'sst-ECMWF-clim.nc', 'sst-ECMWF-trend.nc', 'ts-ECMWF-clim60.nc', 'ts-ECMWF-clim.nc', 'ts-ECMWF-trend.nc']

sdat2 commented 3 years ago

setup.ocean_data_path

['dQdf-sample.nc', 'dQdT-sample.nc', 'om_mask.nc', 'qflx-0.nc', 'qflx.nc', 'qflx-test.nc', 'rzk.pro', 'spline_ECMWF.txt', 'sst-ECMWF-clim.nc', 'tau-ECMWF-clim.x', 'tau-ECMWF-clim.y', 'tau-ECMWF.x', 'tau-ECMWF.y']

sdat2 commented 3 years ago

src/test/test_direc/ocean/SRC/om_forc.F: include 'om_data.h' ! fbwnd,n_wnd,taux0,tauy0,taux1,tauy1 src/test/test_direc/ocean/SRC/om_forc.F: call odb_open(idf_tx, fbwnd(1:n_wnd)//'.x', 0) src/test/test_direc/ocean/SRC/om_forc.F: call odb_open(idf_ty, fbwnd(1:n_wnd)//'.y', 0) src/test/test_direc/ocean/SRC/om_forc.F: call odb_open(idf_tx, fbwnd(1:n_wnd)//'.x', 0) src/test/test_direc/ocean/SRC/om_forc.F: call odb_open(idf_ty, fbwnd(1:n_wnd)//'.y', 0) src/test/test_direc/ocean/SRC/om_wrap.F: n_wnd = inp_str('Wind_file'//CHAR(0), 'wind_data'//CHAR(0), fbwnd) src/test/test_direc/ocean/SRC/om_data.h: integer n_den,n_wnd,n_tem,n_sst,n_slr,n_prp,n_q,n_cld,n_pot,n_sal src/test/test_direc/ocean/SRC/om_data.h: common /new_files/ n_den, n_wnd,n_tem,n_sst, n_slr, n_prp, n_q, n_cld, (/home/users/sithom/seager19/env) [sithom@sci5 seager19]$ grep -R "Wind_file" src/test/test_direc/ocean/SRC src/test/test_direc/ocean/SRC/om_wrap.F: n_wnd = inp_str('Wind_file'//CHAR(0), 'wind_data'//CHAR(0), fbwnd)

sdat2 commented 3 years ago

Turns out I need to make some cdf files for the wind stress inputs:

https://cdf.gsfc.nasa.gov/html/faq.html

CDF vs. netCDF
CDF was designed and developed in 1985 by the National Space Science Data Center (NSSDC) at NASA/GSFC. CDF was originally written in FORTRAN and only available on the VAX/VMS environments. NetCDF was developed a few years later at Unidata, part of the University Corporation for Atmospheric Research (UCAR). The netCDF model was based on that of the CDF conceptual model but provided a number of additional features (such as C language bindings, portable to a number of platforms, machine-independent data format, etc.). Today both models and existing software have matured substantially since and are quite similar in most respects, although they do differ in the following ways:

Although the interfaces do provide the same basic functionality they do differ syntactically. (See users guides for details.)
NetCDF supports named dimensions (i.e., TEMP[x, y, ...]) whereas CDF utilizes the traditional logical (i.e., TEMP[true, true, ...]) method of indicating dimensionality.
CDF supports both multi- and single file filing systems whereas netCDF supports only single file filing systems.
CDF software can transparently access data files in any encoding currently supported by the CDF library (For example: a CDF application running on a Sun can read and write data encoded in a VAX format.) in addition to the machine-independent (XDR) encoding. netCDF-3 software reads and writes data in only the XDR data encoding, but netCDF-4 supports native encodings by default, using a "reader makes right" approach for portability.
The CDF library supports an internal caching algorithm in which the user can make modifications (if so desired) to tweak performance.
The netCDF data object is currently accessible via the HDF software; CDF is not.
As part of the CDF distribution, there exist a number of easy-to-use tools and utilities that enable the user to edit, browse, list, prototype, subset, export to ASCII, compare, etc. the contents of CDF data files.
sdat2 commented 3 years ago

om_test

  +Year 1938
  +Qflux_diag 0

%%%% CONTROL parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Restart 0    0:new;1:cont;2:"+Run_time" more;3-4:restart w/ new TIOS3 
                                                 4:restart w/  new date

%%%% TIME Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% step(s), hour(s), day(s), month(s), year(s) are valid time units.%%
 +Run_time             2 months

%%%% FORCING and INITIALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Wind_file     'DATA/tau-ECMWF-clim'

%%%% VERTICAL MODE INFO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +NUMMODE              2

%%%% Model GEOMETRY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Periodic
 +Mask_file     'DATA/om_mask.nc'
sdat2 commented 3 years ago

om_spin

  +Year 1938
  +Qflux_diag 0

%%%% CONTROL parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Restart 0    0:new;1:cont;2:"+Run_time" more;3-4:restart w/ new TIOS3 
                                                 4:restart w/  new date

%%%% TIME Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% step(s), hour(s), day(s), month(s), year(s) are valid time units.%%
 +Run_time             20 years

%%%% FORCING and INITIALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Wind_file     'DATA/tau-ECMWF-clim'

%%%% VERTICAL MODE INFO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +NUMMODE              2

%%%% Model GEOMETRY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Periodic
 +Mask_file     'DATA/om_mask.nc'
sdat2 commented 3 years ago

om_diag

  +Year 1956
  +Qflux_diag          1  

%%%% CONTROL parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Restart 4    0:new;1:cont;2:"+Run_time" more;3:restart w/ new TIOS
 +Restart_file         "output/om_spin.20y.restart"

%%%% TIME Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% step(s), hour(s), day(s), month(s), year(s) are valid time units.%%
 +Run_time             2 years

%%%% FORCING and INITIALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Wind_file     'DATA/tau-ECMWF-clim' 

 +Ekman_forc           1
 +SST_forc             1
    +SST_file      'DATA/sst-ECMWF-clim.nc'
    +QFLX_file     'DATA/qflx-0.nc'
    +dQdT_file     'DATA/dQdT-sample.nc'
    +dQdf_file     'DATA/dQdf-sample.nc'

 +NUMMODE              2

 +Hcut 5
 +Tcut 14.6
 +Spline_file 'DATA/spline_ECMWF.txt'

 +Periodic
 +Mask_file     'DATA/om_mask.nc'
sdat2 commented 3 years ago

om_run2f

  +Year 1958
  +Qflux_diag   0 

%%%% Restart parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 +Restart 4    0:new;1:cont;2:"+Run_time" more;3:restart w/ new TIOS
 +Restart_file         "output/om_diag.2y.restart"

%%%% TIME Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% step(s), hour(s), day(s), month(s), year(s) are valid time units.%%
 +Run_time             58 years

%%%% FORCING and INITIALIZATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Wind_file should be in N/m^2
 +Wind_file     'DATA/tau-ECMWF' 

 +SST_forc             1
 +Ekman_forc           1
 +f1prime        -0.006

 +SST_file      'DATA/sst-ECMWF-clim.nc'
 +QFLX_file     'DATA/qflx.nc'
 +dQdT_file     'DATA/dQdT-sample.nc'
 +dQdf_file     'DATA/dQdf-sample.nc'

 +Spline_file   'DATA/spline_ECMWF.txt'
 +Hcut 5
 +Tcut 14.6

 +Periodic
 +Mask_file     'DATA/om_mask.nc'

 +NUMMODE              2
sdat2 commented 3 years ago
sdat2 commented 3 years ago
sdat2 commented 3 years ago
sdat2 commented 3 years ago

cd_nino34 cd_nino12

sdat2 commented 3 years ago

cd_pac