<jupyter_start><jupyter_text>fr_lake and fr_land in NARVAL and QUBICC<jupyter_code>import os
import sys
import xarray as xr
import numpy as np
import pandas as pd
import importlib
import matplotlib.pyplot as plt

# For psyplot
import psyplot.project as psy
import matplotlib as mpl
# %matplotlib inline
# %config InlineBackend.close_figures = False

psy.rcParams['plotter.maps.xgrid'] = False
psy.rcParams['plotter.maps.ygrid'] = False
mpl.rcParams['figure.figsize'] = [10., 8.]
# path = '/pf/b/b309170/my_work/QUBICC/data_var_vertinterp/cl/'

# file = 'int_var_hc2_02_p1m_cl_ml_20041110T010000Z.nc'
fr_land_qubicc = '/pf/b/b309170/my_work/QUBICC/data_var_vertinterp_R02B05/fr_land/fr_land_R02B05.nc'
fr_lake_qubicc = '/pf/b/b309170/my_work/QUBICC/data_var_vertinterp_R02B05/fr_lake/fr_lake_R02B05.nc'

fr_lake_narval = '/pf/b/b309170/my_work/NARVAL/grid_extpar/fr_lake_R02B05_NARVAL_fg_DOM01.nc'
fr_land_narval = '/pf/b/b309170/my_work/NARVAL/grid_extpar/fr_land_R02B05_NARVAL_fg_DOM01.nc'
# path = '/pf/b/b309170/my_work/QUBICC/'
# file_cg = 'data_hor_interp/hc2_02_p1m_cl_ml_20041105T150000Z.nc'
# file_orig = 'some_orig_data/hc2_02_p1m_cl_ml_20041105T150000Z.nc'<jupyter_output><empty_output><jupyter_text>Fraction of land<jupyter_code>import xarray as xr

da = xr.open_dataset(fr_land_qubicc)
np.mean(da.land.values)<jupyter_output><empty_output><jupyter_text>Of horizontal coarse-graining (psyplot): If you get the error 'ValueError: Can only plot 2-dimensional data!', then you need to use cdo setgrid on the file first.<jupyter_code>psy.plot.mapplot()
# Note that the cloud cover scheme used was a 0-1 cloud cover scheme.
maps = psy.plot.mapplot(fr_land_qubicc, dims = {'name': 'land'}, 
                        projection='robin', cmap='RdBu_r', title='QUBICC: Fraction of land')
maps = psy.plot.mapplot(fr_land_narval, dims = {'name': 'fr_land'}, 
                        projection='robin', cmap='RdBu_r', title='Horizontally interpolated cloud cover on 20041105 at 15:00 (on layer 40)')
# plt.savefig('horizontally_coarse_grained_cloud_cover.pdf')<jupyter_output><empty_output><jupyter_text>Fraction of lakes<jupyter_code># Note that the cloud cover scheme used was a 0-1 cloud cover scheme.
maps = psy.plot.mapplot(fr_lake_qubicc, dims = {'name': 'lake'}, 
                        projection='robin', cmap='RdBu_r', title='Cloud cover on 20041105 at 15:00 (on layer 40)')
# Note that the cloud cover scheme used was a 0-1 cloud cover scheme.
maps = psy.plot.mapplot(fr_lake_narval, dims = {'name': 'FR_LAKE'}, 
                        projection='robin', cmap='RdBu_r', title='Cloud cover on 20041105 at 15:00 (on layer 40)')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11619190404797601, 'fraction_numerical': 0.06371814092953523, 'mean_word_length': 5.1639722863741335, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '378555', 'license': 'MIT', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1050, 'n_words': 204, 'path': 'additional_content/analyzing_the_data/fr_lake_and_fr_land.ipynb', 'repo_name': 'agrundner24/iconml_clc', 'size': '2668'}